Created
December 8, 2016 22:31
-
-
Save mr-daydream/cb1d833cb4be24dcf2d51b6e44cb876a to your computer and use it in GitHub Desktop.
List out InstanceID or PrivateIP of all AWS instances with a certain name (requires the aws-cli and jq packages)
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
aws ec2 describe-instances --filters "Name=tag:Name,Values=<regex>" | jq '.Reservations[].Instances[].InstanceId' | |
aws ec2 describe-instances --filters "Name=tag:Name,Values=<regex>" | jq '.Reservations[].Instances[].PrivateIpAddress' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment