Skip to content

Instantly share code, notes, and snippets.

@ejoubaud
Last active June 20, 2016 14:54
Show Gist options
  • Save ejoubaud/a04818f4e23b525c1728bc3ed9522070 to your computer and use it in GitHub Desktop.
Save ejoubaud/a04818f4e23b525c1728bc3ed9522070 to your computer and use it in GitHub Desktop.
One-liner to list instance private IPs with the AWS CLI
aws ec2 describe-instances --region us-east-1 --query 'Reservations[].Instances[].[ Tags[?Key==`Name`].Value | [0], PrivateIpAddress, PublicIpAddress ]' --output text | sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment