I have created an autoscaling group with aws cloud formation but anytime I change the userdata, the instances don't get replaced. Is there a way to force this behavior?
Asked
Active
Viewed 188 times
0
-
1There really isn't a great way using CF other than making the instance part of ASG with an [upgrade policy](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-attribute-updatepolicy.html) – jordanm Nov 20 '21 at 19:16
1 Answers
0
You need to implement instance-refresh for ASG: https://docs.aws.amazon.com/autoscaling/ec2/userguide/asg-instance-refresh.html
OR
Manually you need to terminate the instance and new instance should automatically spin-up depending on ASG configuration. You should able to see userdata

Vikas Banage
- 494
- 1
- 8
- 25