Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have an automated script that runs ec2-create-image on my instances to have a highly available backup. When ec2-create-image is run it creates a snapshot with a blank "Name" field. Is there any way to change the "Name" field from the commandline?

I've looked at the man page for ec2-modify-snapshot-attribute, but this only seems to be able to modify permissions of a snapshot.

share|improve this question
up vote 4 down vote accepted

The 'Name' attribute of a snapshot is actually a tag. As such, you can change/set it with the ec2tag command line tool.

 ec2tag snap-xxxxxxxx -t Name=SNAP_NAME

As per the help file:

      ec2addtag ([ec2-create-tags, ec2tag])
      ec2addtag [GENERAL OPTIONS] RESOURCE_ID [RESOURCE_ID ...] --tag KEY[=VALUE] [--tag KEY[=VALUE] ...]   

      Any command option/parameter may be passed a value of '-' to indicate
      that values for that option should be read from stdin.   

      Adds a set of tags to a set of resources. To update a tag's key or value, you also use CreateTags.
          The new values overwrite the old values.

 -t, --tag TAG
           Tag in the form of key[=value].

ec2tag is the 'shortform' of ec2addtag - they both do the same thing. They are included as part of the EC2 API tools.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.