Skip to content

Instantly share code, notes, and snippets.

@ranrotx
Last active April 29, 2016 03:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ranrotx/9b2839b9a3b2dbc04bc8 to your computer and use it in GitHub Desktop.
Save ranrotx/9b2839b9a3b2dbc04bc8 to your computer and use it in GitHub Desktop.
Enable long instance, reservation, snapshot, and volume IDs across all AWS regions.
#!/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
@ranrotx
Copy link
Author

ranrotx commented Apr 29, 2016

Added in snapshot and volume as a resource type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment