I have an AWS EC2 machine I want to attach storage to which after its shutdown isn't deleted. The management should be done using Cloudformation.
I so far, do this using the following snippet:
"BlockDeviceMappings": [
{
"DeviceName": "/dev/sda",
"Ebs": {
"DeleteOnTermination": "false",
"VolumeSize": "10",
"VolumeType": "gp2"
}
}
],
Reading also about AWS:EC2:Volume
and AWS:EC2:VolumeAttachment
can somebody explain the differences? What are the benefits and disadvantage using one way over the other? How do I use the other methods together with an EC2 instance?