Is there any way to get volume-id for attached EBS volumes from the EC2 instance itself (Ubuntu 18.04)?
I'm trying to create shell script which will setup storage on startup, and I have to use volume ID for detecting attached storage. For now, it works fine with nvme disks and NITRO type instances, but I'm still struggling to find a way to somehow extract volume id for older instance types that are not using NVME at all (M4 for example).
lsblk --nodeps -o name,serial simply doesn't work since volume-id is not mapped to "serial"
Any suggestions?