Created
August 11, 2015 07:31
-
-
Save aalbertson/51e7719d76979c4bdd22 to your computer and use it in GitHub Desktop.
quick-awscli-scripts
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
# Simple for loop leveraging both filters and query params off the default "Name" tag: | |
for i in $(aws ec2 describe-instances --region us-west-2 --filters "Name=tag:Name,Values={replace-with-name-tag-value}" --query "Reservations[].Instances[].PrivateIpAddress[]" --output text); do echo -e "ip: $i"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment