Amazon Launch Template - Updated AMI

非 Y 不嫁゛ 提交于 2019-11-30 05:16:00

问题


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.


回答1:


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




回答2:


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.




回答3:


Allow me to described what worked for me. The issue was that AMI was created out of 15 GB volume, however, LC would create a new machine with volume size 8 GB and fit 15 GB inside. I just created new LC and increased the volume size.



来源:https://stackoverflow.com/questions/52102698/amazon-launch-template-updated-ami

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!