ec2-describe-image-attribute
Description
Returns information about an attribute of an AMI. Only one attribute can be specified per call.
Syntax
ec2-describe-image-attribute
ami_id
{-l | -p | -B | --kernel | --ramdisk}
Options
Name | Description | Required |
---|---|---|
|
The ID of the AMI for which an attribute will be described. Type: String Default: None Example: ami-4fa54026 |
Yes |
|
Describes the launch permissions of the AMI. Type: String Default: None Example: -l |
No |
|
Describes the product code associated with the AMI. Type: String Default: None Example: -p |
No |
|
Describes the ID of the kernel associated with the AMI. Type: String Default: None Example: --kernel |
No |
|
Describes the ID of the RAM disk associated with the AMI. Type: String Default: None Example: --ramdisk |
No |
|
Describes the mapping that defines native device names to use when exposing virtual devices. Type: String Default: None Example: -B |
No |
|
Describes the operating system platform. Type: String Default: None Example: --platform |
No |
Output
The command returns a table that contains the following information:
-
Attribute type identifier
-
ID of the AMI
-
Attribute value type or attribute list item value type
-
Attribute or attribute list item value
Amazon EC2 displays errors on stderr.
Examples
Example Request
This example lists the launch permissions for the ami-61a54008 AMI
PROMPT>ec2-describe-image-attribute ami-2bb65342 -l
launchPermission ami-2bb65342 group all
launchPermission ami-2bb65342 userId 495219933132
Example Request
This example lists the product code for the ami-2bb65342AMI.
PROMPT>ec2-describe-image-attribute ami-2bb65342 -p
productCodes ami-2bb65342 productCode 774F4FF8