Created
February 12, 2015 16:40
-
-
Save sebsto/505c91bf53bc77c4b921 to your computer and use it in GitHub Desktop.
Select two AZ with a default subnet in (comma separated)
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
aws ec2 describe-subnets --query 'Subnets[?DefaultForAz == `true`] | @[0:2][].AvailabilityZone' --output text | sed -e 's/\t/,/g’ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This requires at least these version of JMESPath and AWSCLI
[ec2-user@ip-1-1-2-61 ~]$ pip list | grep jmes
jmespath (0.6.1)
[ec2-user@ip-1-1-2-61 ~]$ pip list | grep aws
aws-cfn-bootstrap (1.4)
awscli (1.7.4)
[ec2-user@ip-1-1-2-61 ~]$ pip list | grep boto
boto (2.35.2)
botocore (0.85.0)