Skip to content

Instantly share code, notes, and snippets.

@phanviet
Created April 6, 2020 10:17
Show Gist options
  • Save phanviet/0628a86ac1f943a8f8932cdc371bd41a to your computer and use it in GitHub Desktop.
Save phanviet/0628a86ac1f943a8f8932cdc371bd41a to your computer and use it in GitHub Desktop.
FUNCTION_NAME=function_name_without_qualifiers
for region in $(aws --output text ec2 describe-regions | cut -f 3)
do
for loggroup in $(aws --output text logs describe-log-groups --log-group-name "/aws/lambda/us-east-1.$FUNCTION_NAME" --region $region --query 'logGroups[].logGroupName')
do
echo $region $loggroup
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment