Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/usr/bin/env bash
# description: lists EC2 instances in ALL regions.
# credit: https://github.com/aws/aws-cli/issues/1777
for region in `aws ec2 describe-regions --query Regions[*].[RegionName] --output text`
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