Bash function to easily lookup EC2 instances in one region
Pretty ugly but very convenient:
function ec2-lookup() {
aws ec2 describe-instances --region $1 --filters "Name=tag:Name,Values=*$2*" --query='Reservations[*].Instances[*].[PublicDnsName,Tags[*].Value]' --output text
}
Usage: ec2-lookup us-east-1 fizzbuzz
Written by David Dossot
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ec2
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#