volumesinstance = ec2.get_all_instances(filters=filter)
ids = [z for k in volumesinstance for z in k.instances]
for s in ids:
    print(volumes.id, '-', s.id, '-', volumes.attach_data.device)

def unattachedvolumes():
    for unattachedvol in vol:
        state = unattachedvol.attachment_state()
if state == None:
    print(unattachedvol.id, state)
attachedvolumes()
unattachedvolumes()
Using Boto to find to which device and EBS Volume is mounted