Created
October 10, 2014 16:57
-
-
Save ddossot/817541a3095c4222c121 to your computer and use it in GitHub Desktop.
A little helper to lookup AWS instances in one region: fetches by tag and returns public DNS name and tag values.
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
function aws-lookup() { | |
aws ec2 describe-instances --region $1 --filters "Name=tag:Name,Values=$2*" --query='Reservations[*].Instances[*].[PublicDnsName,Tags[*].Value]' --output text | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment