ec2-modify-image-attribute
Description
Modifies an attribute of an AMI.
Syntax
ec2-modify-image-attribute
ami_id
{-l (-a entity
| -r entity
) | --product-code code
}
Options
Name | Description | Required |
---|---|---|
|
The AMI ID. Type: String Default: None Example: ami-2bb65342 |
Yes |
Output
The command 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
Example Request
This example makes this a public AMI and grants specific permissions to a user.
PROMPT>ec2-modify-image-attribute ami-2bb65342 -l -a AIDADH4IGTRXXKCD
launchPermission ami-2bb65342 ADD userId AIDADH4IGTRXXKCD
Example Request
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