Last active
April 29, 2016 03:28
-
-
Save ranrotx/9b2839b9a3b2dbc04bc8 to your computer and use it in GitHub Desktop.
Enable long instance, reservation, snapshot, and volume IDs across all AWS regions.
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
#!/bin/bash | |
REGIONS=`aws ec2 describe-regions --region us-east-1 --output text | awk '{print $3}'` | |
for r in $REGIONS; do | |
echo "Enabling long IDs for instnaces and reservations in $r" | |
aws ec2 modify-id-format --resource instance --use-long-ids --region $r | |
aws ec2 modify-id-format --resource reservation --use-long-ids --region $r | |
aws ec2 modify-id-format --resource snapshot --use-long-ids --region $r | |
aws ec2 modify-id-format --resource volume --use-long-ids --region $r | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Added in snapshot and volume as a resource type.