Reputation: 3267
So I know I can grab all lambda functions via this command in text/csv form:
aws lambda list-functions --region us-east-1 --query 'Functions[].FunctionName' --output text
But I want to list all the functions with their relevant tags associated with the lambda. How do I do it? I want to output all of them into a CSV/text form, such as:
Name Tag_1 Tag2
{lambda_name} {tag_1} {tag_2}
Upvotes: 2
Views: 3290
Reputation: 10333
We can combine list-functions and list-tags
An example:
aws lambda list-functions | jq -r ".Functions[].FunctionArn" | xargs -I {} aws lambda list-tags --resource {} --query '{"{}":Tags}'
Upvotes: 4
Reputation: 6998
You would first of all need to call aws lambda list-functions
, then save the results, and then call aws lambda list-tags --resource 'YourLambda'
for all of your retrieved functions. Unfortunately there is no other way currently.
Upvotes: 1