Skip to content

Instantly share code, notes, and snippets.

@dannycroft
Created December 15, 2017 12:42
Show Gist options
  • Save dannycroft/ef1935e0f34fec0f870f56c0ed6f1d88 to your computer and use it in GitHub Desktop.
Save dannycroft/ef1935e0f34fec0f870f56c0ed6f1d88 to your computer and use it in GitHub Desktop.
Get a list of instance with id, name and type
aws --output table ec2 describe-instances --query 'Reservations[].Instances[].[Tags[?Key==`Name`] | [0].Value,InstanceId,InstanceType]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment