Getting Information About Your Volumes

You can get information about your volumes using AWS CLI, like their type, size, and attachment to an instance.

If you exceed the number of identical requests allowed for a configured time period, the RequestLimitExceeded error message is returned.

This procedure uses AWS CLI only. Information about these resources is also available from Cockpit. For more information, see Volumes User Interface (for Cockpit v1) or the Volumes dashboard (for Cockpit v2-beta).

To get information about your volumes, use the describe-volumes command following this syntax:

Request sample
$ aws ec2 describe-volumes \
    --profile YOUR_PROFILE \
    --volume-id vol-12345678 \
    --filters Name=X,Values=Y \
    --endpoint https://fcu.eu-west-2.outscale.com

This command contains the following attributes that you need to specify:

  • (optional) profile: The named profile you want to use, created when configuring AWS CLI. For more information, see Installing and Configuring AWS CLI.

  • (optional) volume-id: One or more volume IDs.

    If you do not specify any volume ID, the request returns a description of all your volumes.

  • (optional) filters: One or more filters, in the "Name=X,Values=Y" format.

    You can specify several values for a same filter using the "Name=X,Values=Y, Z" format.

    The following filters are available:

    • attachment.attach-time: The time at which the attachment was initiated.

    • attachment.delete-on-termination: Whether the volume is deleted when terminating the instance.

    • attachment.device: The device on which the volume is attached.

    • attachment.instance-id: The ID of the instance the volume is attached to.

    • attachment.status: The attachment state (attaching | attached | detaching | detached)

    • availability-zone: The Availability Zone in which the volume was created. For more information, see About Regions, Endpoints, and Availability Zones.

    • create-time: The date and time of creation.

    • tag-key: The key of a tag associated with the resource.

    • tag-value: The value of a tag associated with the resource.

    • tag:XXXX: The value of a tag associated with the resource, where XXXX is the key of the tag.

      To filter a tag whose key is XXXX and value is YYYY, you can therefore use either of the following two formats:

      • --filters Name=tag-key,Values=XXXX Name=tag-value,Values=YYYY

      • --filters Name=tag:XXXX,Values=YYYY

    • volume-id: The ID of the volume.

    • volume-type: The type of the volume (standard | gp2 | io1).

    • snapshot-id: The snapshot from which the volume was created.

    • size: The size of the volume, in gibibytes (GiB).

    • status: The state of the volume (creating | available | in-use | deleting | error). For more information, see About Volumes.

  • endpoint: The endpoint corresponding to the Region you want to send the request to.

The describe-volumes command returns the following elements:

  • Volumes: Information about one or more volumes. This element contains the following information:

    • AvailabilityZone: The Availability Zone where the volume is.

    • Attachments: Information about your volume attachment to an instance. This element contains the following information:

      • AttachTime: The date and time at which the volume was attached to the instance.

      • InstanceId: The ID of the instance.

      • VolumeId: The ID of the volume.

      • State: The attachment state of the volume (attaching | detaching | attached | detached).

      • DeleteOnTermination: If true, the volume is deleted when terminating the instance. If false, the volume is not deleted when terminating the instance.

      • Device: The name of the device.

    • Tags: One or more tags associated with the volume. This element contains the following information:

      • TagKey: The key of the tag associated with the resource.

      • TagValue: The value of the tag associated with the resource.

    • VolumeType: The type of volume (standard | gp2 | io1). For more information about volume types, see About Volumes > About Volumes#VolumeTypes.

    • VolumeId: The ID of the volume.

    • State: The state of the volume. For more information, see About Volumes.

    • (io1 ang gp2 only) Iops: The number of IOPS. For io1 volumes, the number of provisioned IOPS. For gp2 volumes, the baseline performance of the volume. For more information, see About Volumes.

    • SnapshotId: The ID of the snapshot from which you created the volume.

    • CreateTime: The date and time of creation.

    • Size: The size of the volume (in GiB).

Result sample
"Volumes": [
    {
        "AvailabilityZone": "eu-west-2a",
        "Attachments": [
            {
                "AttachTime": "2015-03-18T09:36:45.728Z",
                "InstanceId": "i-12345678",
                "VolumeId": "vol-87654321",
                "State": "attached",
                "DeleteOnTermination": false,
                "Device": "/dev/xvdb"
            }
        ],
        "Tags": [],
        "VolumeType": "io1",
        "VolumeId": "vol-87654321",
        "State": "in-use",
        "Iops": 500,
        "SnapshotId": null,
        "CreateTime": "2015-01-26T11:01:08.381Z",
        "Size": 50
    }

Related Pages

Corresponding API Method

AWS™ and Amazon Web Services™ are trademarks of Amazon Technologies, Inc or its affiliates in the United States and/or other countries.