Instantly share code, notes, and snippets.

Embed
What would you like to do?
get public DNS of EC2 instances tagged with a certain value
aws ec2 describe-instances --region us-east-1 --filters "Name=tag:Group,Values=fancyapp1" --output json --query 'Reservations[*].Instances[*].{Name:Tags[?Key==`Name`].Value,PublicIP:PublicIpAddress}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment