Skip to content

Instantly share code, notes, and snippets.

@saurabh2590
Created September 20, 2022 08:33
Show Gist options
  • Save saurabh2590/19d7ce1db747a86c3aded0e1858ddd5b to your computer and use it in GitHub Desktop.
Save saurabh2590/19d7ce1db747a86c3aded0e1858ddd5b to your computer and use it in GitHub Desktop.
Checks AWS Lamdba
#!/bin/bash
PROFILE=$1
RUNTIME=$2
REGIONS=$(aws --profile ${PROFILE} ec2 describe-regions --query 'Regions[*].RegionName' --output text)
for REGION in ${REGIONS}; do
echo ${REGION}
aws --profile ${PROFILE} lambda list-functions --function-version ALL --region ${REGION} --output json --query "Functions[?Runtime=='${RUNTIME}'].FunctionArn"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment