Skip to content

Instantly share code, notes, and snippets.

@abihf
Created April 27, 2018 18:52
Show Gist options
  • Select an option

  • Save abihf/e40acd646af9138396cd9e3f81923bbf to your computer and use it in GitHub Desktop.

Select an option

Save abihf/e40acd646af9138396cd9e3f81923bbf to your computer and use it in GitHub Desktop.
List Subnet by name
aws ec2 describe-subnets | jq '[ .Subnets[] | {name: (.Tags[] | select(.Key == "Name") | .Value), id: .SubnetId} ] | sort_by(.name) | .[] | (.id + " " + .name)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment