Skip to content

Instantly share code, notes, and snippets.

@chaserx
Created October 27, 2019 17:13
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 chaserx/6ab418638f0daabede8efc8f741a389b to your computer and use it in GitHub Desktop.
Save chaserx/6ab418638f0daabede8efc8f741a389b to your computer and use it in GitHub Desktop.
Extract relevant info from AWS CLI with jq
aws ec2 describe-instances --profile=chaserx | jq '.Reservations[].Instances[] | { instance: .InstanceId, publicip: .PublicIpAddress, privateip: .PrivateIpAddress, publicDNS: .PublicDnsName, tags: .Tags, state: .State.Name }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment