ec2-modify-image-attribute
Syntax
ec2-modify-image-attribute
ami_id
-l (-a item_value
| -r item_value
)
ec2-modify-image-attribute
ami_id
-p product_code
[-p product_code
...]
Description
Modifies an attribute for the specified AMI.
Attributes
Attribute Name | Type | Description |
---|---|---|
| List | Controls who has permission to launch the AMI. You can grant launch permissions
by adding user IDs or make the AMI public by adding the |
Note | |
---|---|
If another user launches your AMI there is no mechanism to prevent that user from rebundling the image and registering it as a new AMI. |
productCodes
List
Associates a product code with an AMI. This allows a developer to charge a user for using the AMI.
Note | |
---|---|
The user must be signed up for the product before they can launch the AMI. |
The product code attribute is a write-once attribute. After a product code is set for an AMI it cannot be altered or removed. AMIs are limited to one product code.
Options
Option | Description | Required |
---|---|---|
|
Modifies the Example: |
Yes |
|
Adds or removes an attribute item. The type of the item is inferred
from the item value. For
Example: |
Yes |
|
Sets the Example: |
Yes |
Output
Amazon EC2 returns a table that contains the following information:
-
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.
Amazon EC2 displays errors on stderr
.
Examples
The following example modifies launch permission attributes
for the ami-2bb65342
AMI:
PROMPT>
ec2-modify-image-attribute ami-2bb65342 -l -a AIDADH4IGTRXXKCD
launchPermission ami-2bb65342 ADD userId AIDADH4IGTRXXKCD
The following example adds the 774F4FF8
product code
to the ami-2bb65342
AMI:
PROMPT>
ec2-modify-image-attribute ami-2bb65342 -p 774F4FF8
productCodes ami-2bb65342 productCode 774F4FF8