create_launch_template_version persists existing BlockDeviceMappings even when it's not specified #4429
Labels
bug
This issue is a confirmed bug.
ec2
p2
This is a standard priority issue
response-requested
Waiting on additional information or feedback.
Describe the bug
We have a bunch of Launch Templates that include a variety of Block Device Mappings.
Some of these LTs only have a single mapping that looks something like
For these LTs, we want to create new versions that are the same as existing one except they need to drop this mapping, i.e. have a new version of the LT without any mappings.
We've tried various ways to achieve this, and believe (and confirmed with AWS Support) that the right way would be to basically just drop the entire
BlockDeviceMappings
-- that is, take the existingLaunchTemplateData
from the Source LT Version, removeBlockDeviceMappings
, from it, and then pass it tocreate_launch_template_version
as the newLaunchTemplateData
.We confirmed this sequence of steps works as expected with the AWS CLI, but consistently fails with Boto3 for some reason.
With Boto3, the new resulting LT version still has the same mapping as the original version.
Regression Issue
Expected Behavior
Expectation is that new LT version will be same as the Source one, but without any
BlockDeviceMappings
.Current Behavior
The current behavior (with Boto3) is that the
BlockDeviceMappings
section shows up in the new LT version despite it being dropped fromLaunchTemplateData
when callingcreate_launch_template_version
Reproduction Steps
Attaching output of this script with Boto debug logging enabled
boto3_debug_output.txt
Possible Solution
No response
Additional Information/Context
As noted above, if I do the same thing but with AWS CLI, it works as expected.
Essentially something like this:
SDK version used
1.35.78
Environment details (OS name and version, etc.)
macOS Ventura 13.7.1 [Apple M2 Ultra]
The text was updated successfully, but these errors were encountered: