Skip to content

Instantly share code, notes, and snippets.

@jknsware
Last active January 11, 2019 19:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jknsware/6843ff0529a03039ab6b0e97c66a5d79 to your computer and use it in GitHub Desktop.
Save jknsware/6843ff0529a03039ab6b0e97c66a5d79 to your computer and use it in GitHub Desktop.
aws cli + jq examples
# Pull InstanceId, Private IP, and Tag
aws ec2 describe-instances | jq -r '.Reservations[].Instances[] | [.InstanceId, .NetworkInterfaces[].PrivateIpAddress, (.Tags[]|select(.Key=="Name")|.Value)]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment