- Newest
- Most votes
- Most comments
Answering my own question, which took me quite a lot of time to figure out. The issue is that when I am updating the LT through the Management Console, if I don't update the volume, then the LT does not store a BlockDeviceMapping for that volume. This appears to be a new behavior. The problem was that the LT does store BlockDeviceMappings for the pre-existing NoDevice entries. Since BlockDeviceMappings are stored with the LT, those mappings are used by the LT, not the default mappings. Since there is no longer a mapping defined for the root volume, an instance is launched without one. This is obviously a problem.
To resolve this, I created a new version of the template using the CLI and JQ which deletes the BlockDeviceMappings.
aws ec2 create-launch-template-version --launch-template-id <lt_id> --launch-template-data "$(aws ec2 describe-launch-template-versions --versions <latest_version> --launch-template-id <lt_id> --query "LaunchTemplateVersions[0].LaunchTemplateData" | jq 'del(.BlockDeviceMappings)')"
Hope this helps someone out there who is as befuddled as I was.
Relevant content
- asked 2 years ago
- asked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated a year ago