Skip to content

Instantly share code, notes, and snippets.

@andreyev
Created June 18, 2021 17:07
Show Gist options
  • Save andreyev/d73534cf3deaf159a59a924a26c1c7c9 to your computer and use it in GitHub Desktop.
Save andreyev/d73534cf3deaf159a59a924a26c1c7c9 to your computer and use it in GitHub Desktop.
list all aws resources by ARN
aws ec2 describe-regions --region us-east-1 | jq -r '.Regions[].RegionName' | sort | while read REGION; do aws resourcegroupstaggingapi get-resources --region $REGION | jq --arg Region $REGION -r '.ResourceTagMappingList[]|"\($Region):\(.ResourceARN)"'; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment