ec2-describe-images
ec2-describe-images[
ami_id
...] [-a] [-o owner
...] [-x user_id
]
Returns information about AMIs available to the user. This includes public AMIs available for any user to launch, private AMIs owned by the user making the request, and private AMIs owned by other users for which the user has explicit launch permissions.
The list of AMIs returned can be modified by specifying AMI IDs, AMI owners, or users with launch permissions. If no options are specified, Amazon EC2 returns all AMIs for which the user has launch permissions.
If you specify one or more AMI IDs, only AMIs that have the specified IDs are returned. If you specify an invalid AMI ID, a fault is returned. If you specify an AMI ID for which you do not have access, it will not be included in the results.
If you specify one or more AMI owners, only AMIs from the
specified owners and for which you have access are returned. The
results can include the account IDs of the specified owners,
amazon
for AMIs owned by Amazon or
self
for AMIs that you own.
If you specify a list of executable users, only users that have
launch permissions for the AMIs are returned. You can specify
account IDs (if you own the AMI(s)), self
for AMIs for which you own or have explicit permissions, or
all
for public AMIs.
Note | |
---|---|
If you do not specify any optional parameters, Amazon EC2 returns images you own or images for which you have explicit access. Public images are not returned. |
Option | Description | Required |
---|---|---|
|
Returns AMIs that the user owns and for which the user has execution permissions. Example: |
No |
|
Returns AMIs owned by the specified owner. Multiple owners
can be specified. Owners are specified with AWS user account ID, without
dashes. The IDs Example: |
No |
|
Returns AMIs for which the specified user has explicit launch permissions.
The user ID can be a user's account ID, Example: |
No |
Amazon EC2 returns a table that contains the following information:
-
A record type identifier ("IMAGE")
-
Image identifier
-
Manifest location
-
User identifier of the user that registered the image
-
Image status
-
Image visability (
public
orprivate
) -
Product codes, if any, that are attached to the instance
Amazon EC2 displays errors on stderr.
This example describes the ami-78a54011
AMI:
$
ec2-describe-images ami-78a54011
IMAGE ami-78a54011 powerdns/image.manifest.xml 495219933132 available private 774F4FF8
This example describes the Amazon 64-bit AMI::
$
ec2-describe-images –o amazon | grep x86_64
IMAGE ami-78a54034 ec2-public-images/fedora-core6-base-x86_64.manifest.xml amazon available public