ec2-modify-image-attribute

ec2-modify-image-attribute AMI -l (-a ITEM_VALUE | -r ITEM_VALUE)

Modifies an attribute for the specified AMI.

Currently the only attribute supported is launchPermission. By modifying this attribute it is possible to make an AMI public or to grant specific users launch permissions for the AMI. To make the AMI public add all. To grant launch permissions for a specific user add that user's AWS account id.

Note:

If another user launches your AMI there is nothing that prevents that user from rebundling the image and registering it as a new AMI.

A table containing the following information is returned:

Errors are displayed on stderr.

OptionDefinitionRequired?Example
-lModify the launchPermission property.Yes-l
-a ITEM_VALUE | -r ITEM_VALUE Adds or removes an attribute item. The value of the item is ITEM_VALUE. The type of the item is inferred from the item value. For launchPermission there are two item types:
  • group: The only group currently supported is the all group. Adding this group sets public launch permissions for the AMI.
  • userId: UserId must be in the form of an AWS account id. Adding userId items grants explicit launch permissions to that user for the AMI.
Yes-a all
$ ec2-modify-image-attribute ami-5bae4b32 -l -a 495219933132
launchPermission ami-5bae4b32 ADD userId 495219933132