By using AWS re:Post, you agree to the Terms of Use

Type of disk attached to an instance


Hello. Is there an easy way to find out if the disk attached to an instance is gp2, gp3 or io1? I'd like to know how to do this both from the console and once I'm connected to the instance. The console simply shows:

Root device type			ebs
Root device				/dev/sda1
Block devices				/dev/sda1
Elastic Graphics ID			-
Elastic Inference accelerator ID	-
Capacity Reservation			-
Capacity Reservation Settings		Open
Outpost Arn				-```
3 Answers
Accepted Answer

Here is a command you can run to show this information. Replace $INSTANCE_ID below with your instance ID.

aws ec2 describe-volumes --filters Name=attachment.instance-id,Values=$INSTANCE_ID --query '[Volumes[*].VolumeId,Volumes[*].Attachments[0].InstanceId,Volumes[*].Attachments[0].Device,Volumes[*].VolumeType]' --output text

Each volume attached to the instance will be in a separate column. The row values are the volume ID, instance ID, device attachment, and volume type. For example:

vol-xxxxxxxxxxx   vol-zzzzzzzzz
i-yyyyyyyyy     i-yyyyyyyyy
/dev/xvda       /dev/sdf
gp2     gp3
answered 9 months ago
profile picture
reviewed 9 months ago
  • It worked. Thanks.


Hi, good question. You can do this on the new AWS Management console by viewing volumes, where this will list information such as size, volume type, whether the volume is encrypted, which KMS key was used to encrypt the volume, and the specific instance to which it is attached.

Via CLI: describe-volumes

answered 9 months ago
  • I switched to the new console but, somehow, when I click on the volume, the page goes blank (not sure why). I'll try with a different instance later. (I'm trying not to use the CLI for reasons that would take me a while to explain)


To look it up by volume device name (/dev/nvme1n1 in my example), use the following command:

lsblk -P -o SERIAL /dev/nvme1n1 |cut -d "\"" -f 2 | sed "s/vol/vol-/" | xargs aws ec2 describe-volumes --volume-ids --query "Volumes[*].VolumeType" --output text

The command will return the volume type:

answered 9 months ago
  • It worked. Thanks.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions