Skip to content

Instantly share code, notes, and snippets.

@alexclifford
Created March 12, 2015 23:24
Show Gist options
  • Save alexclifford/8f181622f0eaa0b6dd78 to your computer and use it in GitHub Desktop.
Save alexclifford/8f181622f0eaa0b6dd78 to your computer and use it in GitHub Desktop.
Get all private IP addresses currently assigned
aws ec2 describe-instances --query 'Reservations[*].Instances[*].PrivateIpAddress' --output text | sort -t . -k 1,1n -k 2,2n -k 3,3n -k 4,4
# or
aws ec2 describe-instances --query 'Reservations[*].Instances[*]' --output text | less
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment