Skip to content

Instantly share code, notes, and snippets.

@ajyounguk
Created June 11, 2019 14:48
Show Gist options
  • Save ajyounguk/09e871e030737d1b7e02e80608affba0 to your computer and use it in GitHub Desktop.
Save ajyounguk/09e871e030737d1b7e02e80608affba0 to your computer and use it in GitHub Desktop.
aws script for listing all ac2 instances across all regions, requires aws cli installed and permissions configured
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing Instances in region:'$region'..."
aws ec2 describe-instances --region $region
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment