AWS EC2 Instance Termination Protection not working under auto-scale IN


AWS EC2 Instance Termination Protection not working under auto-scale IN



I have auto scaling group with 3 instances. I configure 1 specific Instance to termination protection = true. However when I modify my autoscaling rules. To the Desired Instance: 2 and Min Instance: 2. That instance above that I recently modified with termination protection still get terminated. Any thoughts?





WHY do you wish to apply termination protection on Auto Scaling instances? That mostly defeats the purpose of using an Auto Scaling group.
– John Rotenstein
Jul 2 at 1:42




2 Answers
2



When you configure EC2 with auto scaling you should use an AMI that would have your golden config. Termination protection will be overwritten by auto scaling. What's your purpose to have an instance not terminated?



Did you actually use the specific Scale In Protection as described in Controlling Which Auto Scaling Instances Terminate During Scale In - Amazon EC2 Auto Scaling or were you using the regular termination protection as described in Terminate Your Instance - Amazon Elastic Compute Cloud?



You want to specfically set the Scale In protection on the instance. And be ware of the notice on the docs that mention that if you dettach the instance and attach it again, the protection setting is lost.






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

How to add background colour in existing image using Swift?

Moria Casán

How to make file upload 'Required' in Contact Form 7?