Skip to content

Instantly share code, notes, and snippets.

@chtz
Created November 4, 2013 12:52
Show Gist options
  • Save chtz/7302007 to your computer and use it in GitHub Desktop.
Save chtz/7302007 to your computer and use it in GitHub Desktop.
Sample AWS EC2 cli-command: display instance id, public dns and state of all instances in a region (leverages boto/jmespath query syntax)
aws ec2 describe-instances --output text --query "Reservations[*].Instances[*].{InstanceId:InstanceId, State: State.Name, DNS: PublicDnsName}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment