Returns a function's tags. You can also view tags with GetFunction.
See also: AWS API Documentation
Request Syntax
response = client.list_tags(
Resource='string'
)
[REQUIRED]
The function's Amazon Resource Name (ARN). Note: Lambda does not support adding tags to aliases or versions.
{
'Tags': {
'string': 'string'
}
}
Response Structure
The function's tags.
Exceptions
Lambda.Client.exceptions.ServiceException
Lambda.Client.exceptions.ResourceNotFoundException
Lambda.Client.exceptions.InvalidParameterValueException
Lambda.Client.exceptions.TooManyRequestsException
Examples
The following example displays the tags attached to the my-function Lambda function.
response = client.list_tags(
Resource='arn:aws:lambda:us-west-2:123456789012:function:my-function',
)
print(response)
Expected Output:
{
'Tags': {
'Category': 'Web Tools',
'Department': 'Sales',
},
'ResponseMetadata': {
'...': '...',
},
}