Skip to content

Instantly share code, notes, and snippets.

@mriddle
Created November 12, 2012 23:23
Show Gist options
  • Save mriddle/4062758 to your computer and use it in GitHub Desktop.
Save mriddle/4062758 to your computer and use it in GitHub Desktop.
How to set name tag on multiple EC2 instances for given AMI
for instance in `ec2-describe-instances | grep ami-80dd59e9 | grep '^INSTANCE' | cut -f2 -s`; do
ec2-create-tags $instance --tag "Name=Foobar"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment