aws-cloudformation / aws-cloudformation/cloudformation-coverage-roadmap
AWS::AutoScaling::AutoScalingGroup UpdatePolicy to disable scale in protection during updates
- Dominant language
- No language data
- Stars
- 1.1k
- Forks
- 62
- PR merge metrics
- No merged PRs in 30d
Description
## 1. Title
AWS::AutoScaling::AutoScalingGroup UpdatePolicy - remove scale in protection during cloudformation updates
## 2. Scope of request
- Add an UpdatePolicy configuration which removes scale in protection from active instances in the group
## 3. Expected behavior
An UpdatePolicy can be configured to remove the scale in protection from existing instances. This could be configured using ratios in a similar way to the existing scaling configuration or integrate with this
## 4. Suggest specific test cases
- Create an Autoscale group with `NewInstancesProtectedFromScaleIn : true`
- Set Max Count: 2, Min Count: 0, DesiredCount:1
- Deploy the stack
- Update the template to set Max Count: 2, Min Count: 0, DesiredCount:0
- The autoscale group will attempt to scale down and will hang
## 6. Category (required) - Will help with tagging and be easier to find by other users to +1
Use the categories as displayed in the AWS Management Console (simplified):
1. Compute (EC2, ECS, EKS, Lambda...)
## 7. Any additional context (optional)
When NewInstancesProtectedFromScaleIn is true on an autoscale group if an update is made which changes the active count of instances or causes a replacement of instances the update attempts to scale down the instances which can not be completed as the instances are protected from scale in.
A current work around is to go into the Ec2 console and remove scale in protection from each instance in the cluster. This needs to be done quickly otherwise the autoscale group cancels the scale in event and cloudformation seems to be stuck until a time out is reached
Contributor guide
Research direction
Start with the AWS::AutoScaling::AutoScalingGroup UpdatePolicy request and reproduce the stated configuration using NewInstancesProtectedFromScaleIn: true. Verify the update from DesiredCount 1 to 0 and the resulting scale-down behavior; done means an UpdatePolicy can remove scale-in protection from active instances so the update completes without manual EC2 changes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud, infrastructure
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100