In Linux machines, block devices have UUID
Below is the CloudFormation template:
"BlockDeviceMappings": [
{
"DeviceName" : "/dev/sdf",
"Ebs" : {
"VolumeSize" : "20",
"DeleteOnTermination" : true
}
}
],
that creates block device of size 20 GB
but, below command does not show UUID on Amazon Linux instance.
$ lsblk -o +UUID --fs /dev/sdf
NAME FSTYPE LABEL UUID MOUNTPOINT UUID
nvme2n1 ext4 /ecs/app_home
How to make "BlockDeviceMappings" generate UUID for /dev/sdf? Idea is to use that UUID and run mkfs.ext4 -U ${uuid_var}...