Skip to content

Instantly share code, notes, and snippets.

@digarok
Created April 4, 2022 14:09
Show Gist options
  • Save digarok/6e45c99229367faf2f078f47c9339190 to your computer and use it in GitHub Desktop.
Save digarok/6e45c99229367faf2f078f47c9339190 to your computer and use it in GitHub Desktop.
List all the regions and availability zones under your current AWS profile.
for R in `aws ec2 describe-regions --query 'Regions[*].RegionName' --output text` ; do ; echo "Region: $R" ; echo "`aws ec2 describe-availability-zones --region $R --query \"AvailabilityZones[*].[ZoneName, ZoneId]\" --output text`" ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment