Created
March 5, 2016 12:14
-
-
Save sebsto/67a43fc7fba1ff258560 to your computer and use it in GitHub Desktop.
Is your account using long EC2 IDs ?
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
# $ aws --version | |
# aws-cli/1.10.8 Python/2.7.11 Darwin/15.3.0 botocore/1.3.30 | |
REGIONS=$(aws ec2 describe-regions --query 'Regions[].RegionName' --output text) | |
for R in $REGIONS ; do echo $R; aws ec2 describe-id-format --region $R --output text; done |
And with volumes and snapshots...
REGIONS=$(aws` ec2 describe-regions --query 'Regions[].RegionName' --output text)
for R in $REGIONS
do
echo $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
And to opt-in for long ids ...