Guest User

Untitled

a guest
Feb 25th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #!/bin/bash
  2. # I use an "Admin" profile in lots of my accounts that has full Admin privileges
  3. # so my profiles in my .aws/config file are named like AAdmin, BAdmin, CAdmin, etc.
  4. PROFILES="AAdmin BAdmin CAdmin"
  5.  
  6. # use ec2 describe-regions to get the official, up-to-the-minute region list.
  7. for profile in $PROFILES
  8. do
  9. REGIONS=$(aws ec2 describe-regions | jq -r '.Regions[].RegionName')
  10. echo -n "${profile}: "
  11. for region in $REGIONS
  12. do
  13. aws ec2 --profile "${profile}" --region ${region} \
  14. modify-id-format --resource all-current --use-long-ids
  15. echo -n "${region} "
  16. done
  17. echo "."
  18. done
Add Comment
Please, Sign In to add comment