- Newest
- Most votes
- Most comments
Hey Jacques, It looks like your auto-scaling group is configured to protect instances from scale-in operations.
To change the instance scale-in protection setting for your auto-scaling group:
-
Open the Amazon EC2 Auto Scaling console at https://console.aws.amazon.com/ec2autoscaling/.
-
Select check box next to the Auto Scaling group.
-
A split pane opens up in the bottom part of the Auto Scaling groups page, showing information about the group that's selected.
-
On the Details tab, choose Advanced configurations, Edit.
-
For Instance scale-in protection, de-select "Enable instance scale-in protection".
-
Choose Update.
For more info, please visit Modify the instance scale-in protection setting for a group.
Note: When the instance scale-in protection setting is enabled, all current instances launched after enabling it will have instance scale-in protection enabled. You might have to disable termination protection on each instance.
To change the instance scale-in protection setting for the current instances:
-
Open the Amazon EC2 Auto Scaling console at https://console.aws.amazon.com/ec2autoscaling/.
-
Select the check box next to your Auto Scaling group.
-
A split pane opens up in the bottom part of the Auto Scaling groups page, showing information about the group that's selected.
-
On the Instance management tab, in Instances, select all of your instances.
-
Choose Actions, Remove scale-in protection. When prompted, choose Remove scale-in protection.
For more info, please visit Modify the instance scale-in protection setting for an instance.
Please let me know if this works or if you have any further concerns and I will be happy to help!
Thanks for the answer, Venkat!
What's strange is that AWS Batch created the Auto Scaling group with scale-in protection enabled by default.
It shouldn't do that, right?
Is there maybe a config option for AWS Batch that I misconfigured that somehow caused it to enable scale-in protection by default, or could this be a bug with how Batch manages Auto Scaling groups?
Hey Jacques,
When you create the compute environment with Managed scaling, the autoscaling group is created with "Protected from scale in" enabled by default. This is to ensure that only AWS Batch should be able to scale down the desired-count. You are not supposed to manually scale up/down the desired count.
If you are using Managed scaling and the instances are not scaled down even when the task count is 0, please create a support case with AWS as the support team would have the visibility to explore your configurations and determine the best course of action.
Hope this helps!
Relevant content
- asked 3 years ago
- asked 3 years ago
- asked 2 years ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 2 years ago
To clarify; are you using a managed compute environment? Did you use a launch template when setting up the compute environment? Termination protection can be set as part of your launch template.