Retrieve correct Amazon attached EBS device from instance metadata endpoint
问题 EDIT and TL;DR: ubuntu@ip-172-31-19-77:~/.aws$ aws ec2 describe-instances | jq . | grep -i device "BlockDeviceMappings": [], "RootDeviceType": "ebs", "RootDeviceName": "/dev/sda1", "DeviceIndex": 0, "BlockDeviceMappings": [ "DeviceName": "/dev/sda1", "DeviceName": "/dev/xvdb", "RootDeviceType": "ebs", "RootDeviceName": "/dev/sda1", "DeviceIndex": 0, "BlockDeviceMappings": [ "DeviceName": "/dev/sda1", "RootDeviceType": "ebs", "RootDeviceName": "/dev/sda1", "DeviceIndex": 0,