Last active
July 26, 2023 10:45
-
-
Save amcginlay/7a9282359ac1772ecfd586872ad29932 to your computer and use it in GitHub Desktop.
command for listing all ARNs in current account
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for region in $(aws ec2 describe-regions --query 'Regions[*].[RegionName]' --output text); do | |
# echo "--- ${region} ---" | |
aws resourcegroupstaggingapi get-resources \ | |
--region ${region} \ | |
# --resource-type-filters 'ec2:instance' \ | |
--query 'ResourceTagMappingList[*].[ResourceARN]' \ | |
--output text; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment