Cannot switch one Autoscaling group from launch configuration to launch template

0

I have almost finished converting all of my Autoscaling groups from launch configurations to launch templates, but am stuck at one autoscaling group in eu-north-1.

When I click the "Switch to launch template" link, I get a message "We encountered an unexpected error Please refresh the page and try again." and a JavaScript error in the browser console (both in Firefox and Chromium): "TypeError: this.props.createASGReq.LaunchTemplate is undefined"

I have been able to convert all other autoscaling groups, including one that is also in eu-north-1.

Is this a known bug and if so, is there way to circumvent this without disrupting my services ?

1 Answer
1
Accepted Answer

Just confirming, this happens the moment you click the "Switch to launch template" link, not after you've selected one? I've never seen this error before, but I would guess there's some combination of settings in the ASG and Launch Config that weren't accounted for on the new console causing this. Could you try using the CLI to update this ASG? Settings not specified are ignored (aka, keep your current values), so you would just need something like:

aws autoscaling update-auto-scaling-group --region eu-north-1 --auto-scaling-group-name <MyASG> --launch-template LaunchTemplateId=<lt-000000000000000>,Version='$Latest'

Removing the 2 <> and replacing them with your values. This will update the ASG with the new launch template (removing the launch config) just like if you had swapped it on the console, so no


Alternatively, if you're not comfortable with the CLI or don't have access to make changes with it, could you either:

  1. Open a technical support case so we can look at your exact settings (if you have a technical support plan - link to this post in the case)
  2. Post the output of the below commands (if you have any CLI access at all) - removing any sensitive information like resource IDs and userdata
aws autoscaling describe-auto-scaling-groups --auto-scaling-group-names <MyASG>
aws autoscaling describe-launch-configurations --launch-configuration-names <MyLC>


As a side note, after this issue is resolved I'd recommend looking into new features available with launch templates, like the ability to have multiple instance types and market options (Spot + OnDemand) in a single ASG: https://docs.aws.amazon.com/autoscaling/ec2/userguide/ec2-auto-scaling-mixed-instances-groups.html

AWS
EXPERT
answered 2 years ago
profile picture
EXPERT
reviewed 3 months ago
  • Yes, I confirm that this happens the moment I click the "Switch to launch template" link.

    And I also find it strange I could use the web interface just fine on 9 other autoscaling groups, spread over 5 regions, including one in eu-north-1.

    Thank you very much for the cli hint; I falsely assumed that that would not be enough to actually work before I had switched to launch templates, but this has now done the trick.

  • Glad to hear that worked! I find it quite strange too, but without seeing way more details than we can easily share here, I'm not sure exactly what would be going on. The ASG treats a launch config and launch template largely interchangeably (as long as you aren't trying to use any launch template only features), which is why the CLI worked.

  • Hi @Marcolz - just wanted to update you (and anybody else who saw this error) that we found the root cause and it has been fixed. It sounds like you probably are done by now, but wanted to share this update. Thank you for letting us know and providing your debugging details in the original post!

  • @Shahad_C Ah, good to know, thank you for letting us know and of course for fixing the root cause.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions