Questions tagged with Amazon EC2 Auto Scaling

Content language: English

Sort by most recent

Browse through the questions and answers listed below or filter and sort to narrow down your results.

Autoscaling group points to old version of launch template

Hello, I'm creating a launch template and autoscaling group through cloud formation. The auto-scaling group is currently pointed to the DefaultVersion of the launch template, which is version 1. The latest version of the launch template is version 2. I updated the default version of the launch template to version 3, but I don't see it reflected in the auto-scaling group. I know we update the launch template version through instance refresh, but I would like to know if this is expected behavior to still see version 1 in the autoscaling group even though the default version is now version 2. I want to handle the updates through cloud formation. The problem I'm trying to solve is how do I push changes through cloud formation and handle the updates gracefully in the auto-scaling group. For example - I have two autoscaling groups using the same launch template. Then I decide to update one auto-scaling group to have a different ami. There will be two versions of the launch template, version 1 will have the old ami, and version 2 will have the latest ami. I'd like to gracefully roll out the changes to the autoscaling group 2 through cloud formation. Question 1 - How can I change the auto-scaling group through cloud formation and replace instances gracefully? Question 2 - If I change the version number in the cloud formation template, does it terminate instances first and then redeploy the new ec2 or the other way around?
1
answers
0
votes
13
views
asked a day ago