Created
July 12, 2018 04:04
-
-
Save satour/d3514b28a4d26bcaa0445c07a784d854 to your computer and use it in GitHub Desktop.
This file contains 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
regions=(`aws ec2 describe-regions --query Regions[*].RegionName --output text`) | |
for region in ${regions[@]} | |
do echo "[${region}]" | |
aws ec2 describe-instances \ | |
--query 'Reservations[*].Instances[*].[Placement.AvailabilityZone, State.Name, InstanceId]' \ | |
--output text \ | |
--region ${region} | |
echo "---------------------" | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment