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:
Attribute type identifier.
ID of the AMI on which attributes are being modified.
Action performed on the attribute.
Attribute or attribute list item value type.
Attribute or attribute list item value.
Errors are displayed on stderr.
| Option | Definition | Required? | Example |
|---|---|---|---|
-l | Modify 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:
| Yes | -a all |
$ec2-modify-image-attribute ami-5bae4b32 -l -a 495219933132launchPermission ami-5bae4b32 ADD userId 495219933132