Created
April 4, 2018 08:55
-
-
Save tomellis/47a250a0d439b64c2328e6c50633a409 to your computer and use it in GitHub Desktop.
Matching EC2 Availability Zones Across AWS Accounts in 2018
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
#!/bin/bash | |
for region in `aws ec2 describe-regions --output text --query 'Regions[*].[RegionName]'`; do | |
aws ec2 describe-reserved-instances-offerings --region $region --output text --query 'ReservedInstancesOfferings[*].[AvailabilityZone,ReservedInstancesOfferingId]' --offering-type 'No Upfront' --instance-tenancy default --no-include-marketplace --instance-type m4.large --max-duration 31536000 --offering-class standard --product-description Linux/UNIX | grep -v 'None' | sort -n | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment