ec2-describe-instances
Syntax
ec2-describe-instances [
instance_id
|availability-zone
...]
Description
Describes the current state of the specified instance(s). If you do not specify instances, all your instances are included in the output.
Options
Option | Description | Required |
---|---|---|
| Instance identifier that was generated when the instance launched. Example: | No |
| Returns instances within the specified availability zone. Example: | No |
Output
Amazon EC2 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
statePrivate DNS name associated with the instance. This is only present for instances in the
running
stateInstance state
Key name. If a key was associated with the instance at launch, its name will appear
AMI launch index. For more information, see
Product codes attached to the instance
Instance type. The type of the instance. For more information, see Instance Types
Instance launch time. The time the instance launched
Availability zone. The availability zone in which the instance is located
Amazon EC2 displays errors on stderr
.
Example
This example describes the current state of the instances (currently one) owned by this user.
PROMPT>
ec2-describe-instances
RESERVATION r-15a4417c 495219933132 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 RESERVATION r-1c65b675 262355691199 default INSTANCE i-e5b3108c ami-fac52193 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