Skip to content

Instantly share code, notes, and snippets.

@bonkydog
Created May 19, 2020 14:56
Show Gist options
  • Save bonkydog/950eb79141a2ee9293b3b23ad5642323 to your computer and use it in GitHub Desktop.
Save bonkydog/950eb79141a2ee9293b3b23ad5642323 to your computer and use it in GitHub Desktop.
List AWS EC2 Instances' public DNS name and name tag
aws ec2 describe-instances --query "Reservations[*].Instances[*].[PublicDnsName, (Tags[?Key=='Name'].Value)[0]]" --output=text --no-paginate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment