ec2-describe-instances
Description
Returns information about instances that you own.
If you specify one or more instance IDs, Amazon EC2 returns information for those instances. If you do not specify instance IDs, Amazon EC2 returns information for all relevant instances. If you specify an invalid instance ID, a fault is returned. If you specify an instance that you do not own, it will not be included in the returned results.
Recently terminated instances might appear in the returned results.This interval is usually less than one hour.
Syntax
ec2-describe-instances [
instance_id
|availability_zone
...]
Options
Name | Description | Required |
---|---|---|
|
Instance IDs to describe. Type: String Default: Returns all instances. Example: r-15a4417c |
No |
Output
The command returns a table that contains the following information:
-
Output type identifier ("RESERVATION", "INSTANCE")
-
Instance ID for each running instance
-
AMI ID of the image on which the instance is based
-
Public DNS name associated with the instance. This is only present for instances in the running state
-
Private DNS name associated with the instance. This is only present for instances in the running state
-
Instance state
-
Key name. If a key was associated with the instance at launch, its name will appear
-
AMI launch index
-
Product codes attached to the instance
-
Instance type. The type of the instance
-
Instance launch time. The time the instance launched
-
Availability Zone. The Availability Zone in which the instance is located
-
Monitoring state
Amazon EC2 displays errors on stderr.
Examples
Example Request
This example describes the current state of the instances owned by this user.
PROMPT>ec2-describe-instances
RESERVATION r-15a4417c AIDADH4IGTRXXKCD INSTANCE i-3ea74257 ami-6ba54002 ec2-72-44-33-4.compute-1.amazonaws.com 10-251-50-154.ec2.internal running 0 774F4FF8 m1.small 2007-07-11T16:40:44+0000 aki-ba3adfd3 ari-badbad00 us-east-1a INSTANCE i-31a74258 ami-6ba54002 ec2-72-44-34-23.compute-1.amazonaws.com 10-251-50-156.ec2.internal running 1 m1.small 2007-07-11T16:40:44+0000 aki-ba3adfd3 ari-badbad00 us-east-1a monitoring-enabled
RESERVATION r-1c65b675 262355691199 default INSTANCE i-e5b3108c ami-e3698d8a ec2-75-101-211-130.compute-1.amazonaws.com ip-10-250-57-219.ec2.internal running primary 0 m1.small 2008-09-26T23:53:16+0000 us-east-1a windows IMAGE ami-78a54011 powerdns/image.manifest.xml AIDADH4IGTRXXKCD available private 774F4FF8 i386 machine aki-a2d732cb ari-a3d732ca monitoring-enabled