How do I find to which device an EBS Volume is mounted with Python Boto v2.0?
boto.ec2.Volume has some interesting properies like attachment_state and
If you also want the block device mappings (in linux, the local device name of the EBS volume), you can also use EC2Connection.get_instance_attribute to retrieve a list of the local device names and their corresponding EBS objects:
def get_block_device_mapping(instance_id):
return conn.get_instance_attribute(
instance_id=instance_id,
attribute='blockDeviceMapping'
)['blockDeviceMapping']
This will return a dictionary with local device names as keys, and EBS objects as values (from which you can get all sorts of things like the volume-id).