Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # I use an "Admin" profile in lots of my accounts that has full Admin privileges
- # so my profiles in my .aws/config file are named like AAdmin, BAdmin, CAdmin, etc.
- PROFILES="AAdmin BAdmin CAdmin"
- # use ec2 describe-regions to get the official, up-to-the-minute region list.
- for profile in $PROFILES
- do
- REGIONS=$(aws ec2 describe-regions | jq -r '.Regions[].RegionName')
- echo -n "${profile}: "
- for region in $REGIONS
- do
- aws ec2 --profile "${profile}" --region ${region} \
- modify-id-format --resource all-current --use-long-ids
- echo -n "${region} "
- done
- echo "."
- done
Add Comment
Please, Sign In to add comment