1
votes

Is it possible to detect if an attached EBS volume is using GP2 (SSD) or provisioned IOPS (io2)?

Is there a simple curl command I can issue to detect what is attached to my instance? I am on the instance that I want to run this command on.

I'd also like to do it without requiring the AWS credentials

1
Use instance IAM roles to avoid having to supply credentials to the AWS CLI or SDKs.jzonthemtn

1 Answers

2
votes

There is no curl command that will let you know what is the volume type. You will either have check that through the console. Or another way is using a AWS CLI command. Also that is not possible without using AWS Credentials .

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ebs-describing-volumes.html

Using CLI Command.

aws ec2 describe-volumes

Sample Output

{
    "Volumes": [
        {
            "AvailabilityZone": "us-east-1a",
            "Attachments": [
                {
                    "AttachTime": "2013-12-18T22:35:00.000Z",
                    "InstanceId": "i-1234567890abcdef0",
                    "VolumeId": "vol-049df61146c4d7901",
                    "State": "attached",
                    "DeleteOnTermination": true,
                    "Device": "/dev/sda1"
                }
            ],
            "VolumeType": "standard",
            "VolumeId": "vol-049df61146c4d7901",
            "State": "in-use",
            "SnapshotId": "snap-1234567890abcdef0",
            "CreateTime": "2013-12-18T22:35:00.084Z",
            "Size": 8
        },
        {
            "AvailabilityZone": "us-east-1a",
            "Attachments": [],
            "VolumeType": "io1",
            "VolumeId": "vol-1234567890abcdef0",
            "State": "available",
            "Iops": 1000,
            "SnapshotId": null,
            "CreateTime": "2014-02-27T00:02:41.791Z",
            "Size": 100
        }
    ]
}