Skip to content

Instantly share code, notes, and snippets.

View jaypipes's full-sized avatar

Jay Pipes jaypipes

View GitHub Profile
@jaypipes
jaypipes / quick_list_instances.sh
Created June 25, 2019 20:59
Grab instance ID, name, public and private IP address for EC2 instances into array of JSON objects
#!/usr/bin/env bash
aws ec2 describe-instances \
| jq '.Reservations[].Instances[] | { id: .InstanceId, name: .Tags[] | select(.Key == "Name").Value, publicip: .PublicIpAddress, privateip: .PrivateIpAddress }'\
| jq -s 'sort_by(.name)'
### Keybase proof
I hereby claim:
* I am jaypipes on github.
* I am jaypipes (https://keybase.io/jaypipes) on keybase.
* I have a public key ASA7K1JyD_qCRPlaxqCYbNQ_Ge2H2tSuj33oMi2eQpP-dwo
To claim this, I am signing this object: