Amazon Elastic Compute Cloud
User Guide (API Version 2011-12-15)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Describing Volumes and Instances

You can list information about a volume, including the specific instance the volume is attached to.

AWS Management Console

To view information about an Amazon EBS volume

  1. Open the Amazon EC2 console at https://console.aws.amazon.com/ec2/.

  2. Click Volumes in the Navigation pane.

    The console displays a list of current volumes and the instances to which they are attached.

  3. To view more information about a volume, select it.

    Information about the volume appears in the lower pane.

Command Line Tools

To describe volumes and list information about all volumes that you own

  • Enter the following command.

    PROMPT>  ec2-describe-volumes

    Amazon EC2 returns information similar to the following.

    VOLUME vol-4d826724 us-east-1a 80 in-use 2010-03-30T13:58:58+0000
    ATTACHMENT vol-4d826724 i-6058a509 /dev/sdh attached  2010-03-30T13:54:55+0000
    VOLUME vol-50957039 13 us-east-1a available  2010-03-24T08:01:44+0000
    VOLUME vol-6682670f 1 us-east-1a in-use  2010-03-30T08:11:01+0000
    ATTACHMENT vol-6682670f i-69a54000 /dev/sdh attached  2010-03-30T09:21:14+0000 

    This information includes the volume ID, capacity, status (in-use or available), and creation time of each volume. If the volume is attached, an attachment line shows the volume ID, the instance ID to which the volume is attached, the device name exposed to the instance, its status (attaching, attached, detaching, detached), and when it attached.

To describe instances and list volumes that are attached to running instances

  • Enter the following command.

    PROMPT>  ec2-describe-instances

    Amazon EC2 returns information similar to the following.

    RESERVATION     r-f25e6f9a      111122223333    default
    INSTANCE        i-84b435de      ami-b232d0db    ec2-184-73-201-68.compute-1.amazonaws.comdomU-12-31-39-00-86-35.compute-1.internal       running gsg-keypair     0               m1.small 2010-03-30T08:43:48+0000        us-east-1a      aki-94c527fd    ari-96c527ff    monitoring-disabled      184.73.201.68   10.254.137.191                  ebs
    BLOCKDEVICE     /dev/sda1       vol-cf13b3a6    2010-03-30T08:01:44.000Z
    BLOCKDEVICE     /dev/sdh        vol-c7f95aae    2010-03-30T13:58:58.000Z 

For more information about block device mapping, see Block Device Mapping.

[Tip]Tip

You can filter the results to return only the information about volumes and instances that match the criteria you specify. For more information about how to filter the results, go to ec2-describe-volumes and ec2-describe-instances in the Amazon Elastic Compute Cloud Command Line Reference.

API

To describe volumes and list information about all volumes that you own

  • Construct the following Query request.

    https://ec2.amazonaws.com/
    ?Action=DescribeVolumes
    &...auth parameters...
    

    Following is an example response.

    <DescribeVolumesResponse xmlns="http://ec2.amazonaws.com/doc/2011-12-15/">
    <volumeSet>
      <item>
        <volumeId>vol-4282672b</volumeId>
        <size>80</size>
        <status>in-use</status>
        <createTime>2008-05-07T11:51:50.000Z</createTime>
        <attachmentSet>
          <item>
            <volumeId>vol-4282672b</volumeId>
            <instanceId>i-6058a509</instanceId>
            <size>80</size>
            <snapshotId>snap-12345678</snapshotId>
            <availabilityZone>us-east-1a</availabilityZone>
            <status>attached</status>
            <attachTime>2008-05-07T12:51:50.000Z</attachTime>
          </item>
        </attachmentSet>
      </item>
      ...
    </volumeSet>
[Tip]Tip

You can filter the results to return only the information about volumes and instances that match the criteria you specify. For more information about how to filter the results, go to DescribeVolumes in the Amazon Elastic Compute Cloud API Reference.