Skip to content

Instantly share code, notes, and snippets.

@juanino
Created December 13, 2016 03:06
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 juanino/7d0a6e0a109c639004e7828e9e9cc7b2 to your computer and use it in GitHub Desktop.
Save juanino/7d0a6e0a109c639004e7828e9e9cc7b2 to your computer and use it in GitHub Desktop.
get a listing of aws instances and name and project tags
/usr/bin/aws ec2 describe-instances --output table --query 'Reservations[].Instances[].[join(`,`,Tags[?Key==`Name`].Value),State.Name,PublicIpAddress,join(`,`,Tags[?Key==`project`].Value),join(`,`,Tags[?Key==`aws:ec2spot:fleet-request-id`].Value)]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment