Created
June 29, 2016 00:44
-
-
Save amosshapira/dae0ba71948993caa6800e9777e03487 to your computer and use it in GitHub Desktop.
List all AZ's in all AWS regions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
aws ec2 describe-regions --query 'Regions[*].RegionName' --output text | \ | |
tr '\t' '\n' | \ | |
while read REGION | |
do | |
aws ec2 describe-availability-zones --region $REGION \ | |
--query 'AvailabilityZones[*].{ZoneName:ZoneName,Region:RegionName}' \ | |
--output text | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment