I have started using Amazon's new Launch Templates and so far liking it however I just recently made an image from one of my instances, I then created a new version of the Launch template and used the new AMI.
When updating my auto scaling group to the new version of the template, upon save it gives me the below error:
Error You must use a valid fully-formed launch template. snapshotId cannot be modified on root device
Do I need to recreate the AMI?
If anyone has any suggestions that would be greatly appreciated.
Ok after a few tries I've discovered that the hint is in the error message as unclear as it was at the time. What I didn't do when creating the new version of the Launch Template was, after updating the AMI ID, I also needed to update the Snapshot ID of the volume used by the template, to the Snapshot ID of the snapshot created when the AMI was created.
Would help if when changing the AMI, it searched a list of existing AMIs then allowed you to select the one you want which will then update the template with the necessary things such as Snapshot ID...
c'est la vie
UPDATE: Today (2019-11-21) AWS released a new Launch Configuration web gui which no longer appears to have this problem - updating the AMI seems to clear out the explicit EBS association no matter what.
Original answer:
This is actually a small specific bug in the AWS web console's interface for creating a new launch template version.
When you enter a new AMI ID in your new launch template version, it shows the new AMI on screen, but it shows the previous block device (snapshot) still. If the very next button you press is 'Create launch template', then you unfortunately get a launch template which point to the new AMI but still points to the old EBS snapshot. If instead the next thing you do is scroll down to the 'Storage (Volumes)' list, and click anywhere in the page, you'll see the listed snapshot update before your eyes, from the old one to the new one. Now when you click 'Create launch template' it will create with the correct snapshot attached.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With