ec2-describe-image-attribute

ec2-describe-image-attribute ami_id ( -l | -p )

Describes an attribute for the specified AMI.

OptionDescriptionRequired

ami_id

AMI identifier.

Example: ami-4fa54026

Yes

-B, --block-device-mapping

Describes the mapping that defines native device names to use when exposing virtual devices.

Type: String

No

-l, --launch-permission

Describes the launchPermission attribute.

Example: -l

Choice

-p, --product-code

Describes the productCodes attribute.

Example: -p

Choice

--kernel

Describes the ID of the kernel associated with the AMI.

Type: String

No

--ramdisk

Describes the ID of the RAM disk associated with the AMI.

Type: String

No

Amazon EC2 returns a table that contains the following information:

Amazon EC2 displays errors on stderr.

This example lists the launch permissions for the ami-2bb65342 AMI.

$ ec2-describe-image-attribute ami-2bb65342 -l
launchPermission ami-2bb65342 group all
launchPermission ami-2bb65342 userId 495219933132

This example lists the product code for the ami-2bb65342 AMI.

$ ec2-describe-image-attribute ami-2bb65342 -p
productCodes ami-2bb65342 productCode 774F4FF8