Step Scaling Policies
What you'll learn: How to configure step scaling policies that adjust your capacity in precise increments based on how severe a metric breach is.
What Are Step Scaling Policies?
Step scaling policies let you add or remove instances in different amounts depending on how far your metric has crossed a threshold. Unlike target tracking (which automatically adjusts to maintain a target), step scaling gives you fine-grained control over exactly how many instances to add or remove at different alarm levels.
Think of it like a thermostat with multiple settings: if the temperature is slightly high, add one degree of cooling; if it's very high, add three degrees; if it's extreme, add five. You're responding proportionally to the problem's severity.
How Step Scaling Works
You define steps (ranges) tied to CloudWatch alarms:
- Step 1: If CPU is 50-60%, add 1 instance
- Step 2: If CPU is 60-75%, add 2 instances
- Step 3: If CPU is 75%+, add 4 instances
Each step triggers when the metric enters that range. The more severe the breach, the more aggressive your scaling response.
Similarly, you create scaling-in steps:
- If CPU drops to 30-20%, remove 1 instance
- If CPU drops below 20%, remove 2 instances
Why Use Step Scaling?
Step scaling is ideal when you know your application's behavior well and want predictable, controlled scaling. It prevents overreacting to small spikes while responding aggressively to genuine load surges. You also avoid the "all-or-nothing" approach—scaling happens in measured increments.
Key Takeaway: Step scaling policies let you scale capacity in precise, graduated steps based on alarm severity, giving you fine-tuned control over how aggressively your infrastructure responds to changing load.