Skip to content

Instantly share code, notes, and snippets.

@rkreddyp
Created May 17, 2020 19:15
Show Gist options
  • Save rkreddyp/78a7f81b00d97a9789a5178ab2110db5 to your computer and use it in GitHub Desktop.
Save rkreddyp/78a7f81b00d97a9789a5178ab2110db5 to your computer and use it in GitHub Desktop.
for i in $(aws ec2 describe-regions --region us-east-1 | grep RegionName | awk '{ print $2}' | sed -e 's/"//g') ; do aws ec2 describe-instances --region $i | jq -r ".Reservations[] | .Instances[] | .Tags[] | select(.Key==\"Name\") |.Value " ; done | grep -i test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment