Auto Scaling Group Protection
Policy Description
What this SCP does
This Service Control Policy (SCP) restricts who can modify or delete Auto Scaling groups, ensuring that production scaling configurations are not changed without proper authorization. This helps maintain application availability.
By limiting Auto Scaling group modifications to only principals with the InfrastructureAdmin role tag, this policy protects your scaling infrastructure from unauthorized changes, ensuring that only designated infrastructure administrators can adjust scaling parameters that might affect application performance and resilience.
Validation Strategy
How to test this SCP works
To validate this SCP, try to create and modify an Auto Scaling group with and without the required role tag.
- Valid test: Create IAM roles with and without the InfrastructureAdmin role tag
- Valid test: Create an Auto Scaling group (should succeed for all roles)
- Expected result: Updating or deleting the Auto Scaling group should succeed for roles tagged with Role=InfrastructureAdmin, but fail for other roles
This testing approach confirms that only properly tagged roles can make changes to Auto Scaling infrastructure, while all other principals are prevented from modifying or removing these critical scaling resources.
SCP Policy & Validation Scenarios
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "DenyAutoScalingGroupModification",
"Effect": "Deny",
"Action": [
"autoscaling:DeleteAutoScalingGroup",
"autoscaling:UpdateAutoScalingGroup"
],
"Resource": "*",
"Condition": {
"StringNotLike": {
"aws:PrincipalTag/Role": "InfrastructureAdmin"
}
}
}
]
}