I have an AMI which I have adapted to my needs. After this preparation, I tried to make again my own AMI out of it with help of a Snapshot. Now I want to use this new AMI inside a Launch Template for later Auto Scaling purposes.
I want to set the flag for the Volume inside the Launch Template that it should be "Deleted on EC2 Instance Termination". Otherwise it will stay there forever and when you autoscale it can be a mess and crowded after some time. I want to set it in the Launch template, Block Device Section the "Delete on Termination" flag to true. Now Automatically I need to choose the "Encryption Flag" as well.
Once I do this I am getting the error message:
Encrypted flag cannot be specified since device /dev/sda1 has a snapshot specified
When I leave the Block Device Section empty, I can't define a new Size, I can't define the Deletion on Termination, etc. but then it works.
So when I just want to define on value in the Block Device Section, I run into that issue, when using a snapshot AMI as described above.
Any idea?