-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ec2 delete-launch-template-versions doesn't have any effect but doesn't give any errors #8892
Comments
Hello RealityCtrl@ thanks for reaching out. I have tried replicating the steps provided and ran the command:
The steps replicated:
For further look, please include the full --debug response from the CLI command that you have entered and redacting any sensitive information. Thank you. |
Hi, thanks for looking at this. I can see the exact same issue when the command is run on a github action runner, the version of the cli is output instead of any action being taken or an error message returned. So I don't think its down to using homebrew to install the cli. This is the script that runs in the action runner to set the latest version of the template to the default and then terminate the instance using version 1 before trying to delete version 1.
Output of the script
|
Hello RealityCtrl@ , thanks for the follow up. When running the command : The reason it returns the AWS Version is because of the flag "--version". The correct parameter is "--versions". Using "--versions", I was able to delete a launch template version as intended. Please let me know if you have any follow-up questions. |
Thanks, problem entirely between keyboard and chair on my end! |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
When executing command
ec2 delete-launch-template-versions
it doesn't apply any effects and it seems from --debug flag it doesn't call the APIs needed to delete the versions.This seems to occur when an an autoscaling group is using multiple versions of the same template and the non-default template is still in use by an instance and you try to delete that version.
It made no difference if supplying versions in quotes or if a launch template ID was used instead of a name.
The version to be deleted isn't the default version.
One instance is using version 1 and two are using version 2.
Version 2 is the default version
Expected Behavior
Either the API call is made to delete the launch template version and the output from documentation is returned or a validation error message is received.
Current Behavior
The CLI version is output and no actions take place or errors are received.
Reproduction Steps
Create a AutoScaling Group via cloudformation with a launch template and a single instance.
Update the AutoScaling Group via cloudformation to add additional instances and a user data.
This creates multiple versions of the same launch template with different user data.
The auto scaling group has both versions in place with one instance using the old version.
Set the version 2 to be the default via the CLI.
Try to delete version 1 that isn't the default with the command ec2 delete-launch-template-versions.
Possible Solution
No response
Additional Information/Context
No response
CLI version used
2.17.42
Environment details (OS name and version, etc.)
Python/3.11.9 Darwin/22.6.0 source/arm64
The text was updated successfully, but these errors were encountered: