Skip to content

Files

Latest commit

19b6109 · Feb 10, 2025

History

History
28 lines (26 loc) · 624 Bytes

File metadata and controls

28 lines (26 loc) · 624 Bytes
aliases category classification date date_modified draft id image links local_archive_links pinned print series tags title type
list-volume-device-id-for-an-ec2-instance
aws
public
2019-12-24 05:18:00 -0800
2019-12-24 05:18:00 -0800
false
20191224131800
false
false
aws-cli
ebs
ec2
List Volume Device ID for an EC2 Instance
tech-note

List the ID of a volume attached to an EC2 instance, using the AWS CLI.

$ aws ec2 describe-volumes --filters "Name=attachment.instance-id,Values=<instance-id>" --query "Volumes[].Attachments[].{DeviceName:Device}" --region <region> --output text