Is there a way/method in the EC2/AWS API such that I can get the EBS volume that is attached to a particular EC2 instance?
IE:
I just want something that allows me to do something along the lines of:
method(instance_id) – returns the EBS volume that this particular instance_id is attached to.
2
Answers
Yes, you can use the describe-instances command from the AWS CLI.
An example:
If you know your instance ID, you can use CLI command:
where
Values
is my instance ID.The answer looks like: