ec2-describe-images

ec2-describe-images[AMI ...] [-a] [-o OWNER ...] [-x USER]

Describes the current state of each AMI specified on the command line. If no AMIs are explicitly listed, the AMIs described can be controlled with the optional parameters. If no optional parameters are specified, it returns all AMIs owned by the user, AMIs for which the user has explicit launch permissions, public AMIs, and Amazon-owned AMIs.

[Note]Note

The default behaviour of ec2-describe-images changed from version 2006-06-26 to version 2006-10-01. In the 2006-06-26 version all images to which the user has access, including public images, are returned. In the version 2006-10-01 and later, only images which the user owns or has explicit access are returned. Public images are not returned.

A table containing the following information is returned:

Errors are displayed on stderr.

OptionDefinitionRequired?Example
-aAll AMIs the user owns and has execution permissions for, both public and explicit are returned. No-a
-o OWNERAMIs owned by the specified owner are returned. Multiple owners may be specified. OWNER is a AWS user account ID, the same ID in the result set for the user that registered the AMI. The IDs amazon, self and explicit may be specified to include AMIs owned by Amazon, AMIs owned by the user, and AMIs for which the user has explicit launch permissions, respectively. No-o 123456789012
-x USEROnly AMIs for which the specified user has explicit launch permissions are returned. USER can be a user's account ID, 'self' to return AMIs for which the sender of the request has explicit launch permissions, or 'all' to return AMIs with public launch permissions.No-x self
$ ec2-describe-images ami-78a54011
IMAGE ami-78a54011 powerdns/image.manifest.xml 495219933132 available private 774F4FF8