Skip to content

Instantly share code, notes, and snippets.

@gregtaylor99
Forked from pahud/list_aws_az.sh
Created March 23, 2018 01:01
Show Gist options
  • Save gregtaylor99/37c3e6b5a8b3d9e604355986d3a8ef32 to your computer and use it in GitHub Desktop.
Save gregtaylor99/37c3e6b5a8b3d9e604355986d3a8ef32 to your computer and use it in GitHub Desktop.
list all AWS AZs with aws-cli
$ aws ec2 describe-regions --query 'Regions[*].RegionName' --output table | awk '$2 ~/-/{print $2}' | while read region; do aws ec2 describe-availability-zones --region $region --query AvailabilityZones[*].ZoneName --output table; done | awk '$2 ~/-/{print $2}'
ap-south-1a
ap-south-1b
eu-west-1a
eu-west-1b
eu-west-1c
ap-southeast-1a
ap-southeast-1b
ap-southeast-2a
ap-southeast-2b
ap-southeast-2c
eu-central-1a
eu-central-1b
ap-northeast-2a
ap-northeast-2c
ap-northeast-1a
ap-northeast-1b
ap-northeast-1c
us-east-1a
us-east-1b
us-east-1c
us-east-1d
us-east-1e
sa-east-1a
sa-east-1b
sa-east-1c
us-west-1a
us-west-1b
us-west-1c
us-west-2a
us-west-2b
us-west-2c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment