This chapter covers the three types of Auto Scaling policies in AWS: Target Tracking, Step, and Simple scaling. Understanding these policies is critical for the SOA-C02 exam, as they are central to the Reliability domain (Objective 2.1). Approximately 10-15% of exam questions touch on Auto Scaling policies, their configuration, and behavior. We will explore how each policy works internally, their key parameters, and how to choose the right one for different workload patterns.
Jump to a section
Imagine a building's HVAC system with three different control modes. Target Tracking is like a smart thermostat that aims to keep the temperature exactly at 72°F. It continuously adjusts heating or cooling output based on the current temperature, using a proportional-integral-derivative (PID) algorithm internally. It doesn't just react when the temperature drifts; it anticipates and ramps up gradually. Step Scaling is like a manual switch that has two positions: if temperature goes above 75°F, it turns on cooling at 100%; if above 80°F, it also turns on emergency cooling. Each step is a discrete action with a fixed magnitude. Simple Scaling is like a timer-based thermostat: you set it to turn on cooling for 10 minutes when temperature exceeds 74°F, then wait 5 minutes before checking again. It does not adjust based on how far the temperature is from the setpoint; it just executes a single action and waits. In AWS, Target Tracking uses a predefined metric and a target value, continuously calculating the required capacity. Step Scaling uses CloudWatch alarms with multiple steps, each adding or removing a fixed number of instances. Simple Scaling executes one scaling action per alarm breach and then waits for a cooldown period before responding again. The key difference: Target Tracking is dynamic and continuous, Step Scaling is discrete with multiple thresholds, and Simple Scaling is a one-shot action with a mandatory cooldown.
What Are Auto Scaling Policies?
Auto Scaling policies define how an Auto Scaling group (ASG) adjusts its desired capacity in response to changes in demand. They are the core mechanism for implementing elasticity in AWS. The three policy types—Target Tracking, Step, and Simple—differ in how they react to CloudWatch alarms and how they calculate the new desired capacity.
Target Tracking Scaling Policy
Target Tracking is the simplest and most intelligent policy. You select a predefined metric (e.g., average CPU utilization, request count per target, or average network in/out) and set a target value. AWS automatically creates the necessary CloudWatch alarms and calculates the scaling adjustment to keep the metric close to the target. It uses a proportional-integral-derivative (PID) controller internally to smooth out adjustments and avoid oscillations.
- How it works: The policy continuously monitors the metric. When the metric deviates from the target, it computes a new desired capacity using the formula: desired_capacity = current_desired_capacity * (current_metric_value / target_value). This is a simple proportional calculation, but AWS applies additional logic to prevent overcorrection.
- Key parameters:
- TargetValue: The target value for the metric (e.g., 50 for CPU utilization).
- DisableScaleIn: If true, the policy will only scale out, not in. Default is false.
- CustomizedMetricSpecification: Allows you to use a custom metric instead of predefined ones.
- Cooldown: Target Tracking does not use a cooldown period. Instead, it has a built-in stabilization period (default 300 seconds) during which it avoids scaling after a significant change. This prevents rapid oscillations.
- Limitations: You can have only one Target Tracking policy per ASG at a time (though you can have multiple policies of different types). The metric must be a valid CloudWatch metric that represents the load on the instances.
Step Scaling Policy
Step Scaling gives you more control by defining how many instances to add or remove based on the magnitude of the alarm breach. You create a CloudWatch alarm and then define step adjustments. Each step has a lower and upper bound (or just one bound) for the metric deviation and a corresponding scaling adjustment (absolute or percentage).
- How it works: When the alarm enters ALARM state, the policy evaluates which step the current metric value falls into and applies the associated adjustment. It then waits for a cooldown period before responding to another alarm breach.
- Key parameters:
- AdjustmentType: Can be ChangeInCapacity, ExactCapacity, or PercentChangeInCapacity.
- StepAdjustments: A list of steps, each with a MetricIntervalLowerBound, MetricIntervalUpperBound, and ScalingAdjustment.
- Cooldown: A cooldown period (seconds) after a scaling activity before the policy can respond again. Default is 300 seconds.
- Important behavior: If the metric continues to breach after a scaling action, the policy will wait for the cooldown to expire and then re-evaluate. This can lead to slower response for rapid spikes.
- Example: Suppose you have a step policy for CPU > 80%:
- Step 1: 80% <= CPU < 90%: add 2 instances - Step 2: CPU >= 90%: add 5 instances When CPU hits 85%, the policy adds 2 instances and starts cooldown. If CPU remains high, after cooldown it re-evaluates and may add more.
Simple Scaling Policy
Simple Scaling is the original scaling policy. You create a CloudWatch alarm and specify a single scaling adjustment (e.g., add 1 instance) and a cooldown period. When the alarm breaches, the policy executes the adjustment and then waits for the cooldown to expire before it can respond to another alarm breach. If the alarm remains in ALARM state after the cooldown, the policy will execute again.
- How it works: Simple Scaling is essentially a one-shot action. It does not consider the magnitude of the breach; it always applies the same adjustment.
- Key parameters:
- AdjustmentType: Same as step scaling.
- ScalingAdjustment: The amount to change capacity.
- Cooldown: A mandatory cooldown period (default 300 seconds).
- Limitations: Simple Scaling is prone to oscillations if the metric fluctuates around the threshold. It also cannot handle multiple alarms gracefully—you need separate policies for scale-out and scale-in.
Comparison of Policy Behaviors
Target Tracking: Continuously adjusts to maintain metric at target. No cooldown; uses stabilization. Best for steady-state workloads with predictable load patterns.
Step Scaling: Responds proportionally to breach magnitude. Has cooldown. Good for workloads with sudden spikes that require different responses.
Simple Scaling: One-size-fits-all adjustment. Has cooldown. Only suitable for simple, predictable workloads where the exact adjustment is known.
CloudWatch Alarm Integration
All scaling policies rely on CloudWatch alarms. For Target Tracking, AWS automatically creates two alarms (one for scale-out, one for scale-in) with appropriate thresholds. For Step and Simple, you create the alarms manually. The alarm must be in ALARM state for the policy to trigger. Note that for Step Scaling, the alarm's metric must be the same as the one used in the step adjustments (usually the same metric, but you can use different metrics for different steps if you create multiple alarms).
Cooldown and Warm-Up
Cooldown: A period after a scaling activity during which the policy will not trigger again. For Simple and Step, cooldown is configurable (default 300 seconds). For Target Tracking, cooldown is replaced by a stabilization period (default 300 seconds) that prevents scaling in response to temporary fluctuations.
Warm-up: The time it takes for a new instance to start contributing to the metric. This is not directly managed by the policy but can be accounted for by using a longer cooldown or by using lifecycle hooks.
Instance Refresh and Health Checks
Auto Scaling policies work independently of instance refresh or health checks. However, if an instance is marked unhealthy and replaced, the policy may see a temporary dip in capacity and trigger scale-out. To avoid this, use health check grace periods.
CLI and API Examples
Create Target Tracking policy:
aws autoscaling put-scaling-policy --auto-scaling-group-name my-asg --policy-name cpu-target --policy-type TargetTrackingScaling --target-tracking-configuration TargetValue=50.0,PredefinedMetricSpecification='{PredefinedMetricType=ASGAverageCPUUtilization}'Create Step Scaling policy:
aws autoscaling put-scaling-policy --auto-scaling-group-name my-asg --policy-name cpu-step --policy-type StepScaling --adjustment-type ChangeInCapacity --step-adjustments MetricIntervalLowerBound=0,MetricIntervalUpperBound=10,ScalingAdjustment=1 MetricIntervalLowerBound=10,ScalingAdjustment=2 --cooldown 300Create Simple Scaling policy:
aws autoscaling put-scaling-policy --auto-scaling-group-name my-asg --policy-name cpu-simple --policy-type SimpleScaling --adjustment-type ChangeInCapacity --scaling-adjustment 1 --cooldown 300Interaction with Other Services
Elastic Load Balancing: Auto Scaling works with ELB to register new instances. The Target Tracking policy can use ELB request count per target as a metric.
CloudWatch: All scaling policies rely on CloudWatch alarms. Custom metrics can be used with Target Tracking via CustomizedMetricSpecification.
Lifecycle Hooks: Can be used to delay instance termination or launch until custom actions complete.
Best Practices
Use Target Tracking as the default policy for most workloads.
Use Step Scaling when you need different responses for different severity levels.
Avoid Simple Scaling unless you have a very simple, predictable workload.
Set cooldown periods based on the time it takes for instances to become fully operational (e.g., after bootstrapping).
Monitor scaling activities in CloudTrail and CloudWatch Logs.
Define Metric and Target
For Target Tracking, you select a predefined metric (e.g., ASGAverageCPUUtilization) and set a target value (e.g., 50). AWS automatically creates two CloudWatch alarms: one for scale-out (metric > target) and one for scale-in (metric < target). The alarms use a statistic (e.g., Average) over a period (default 60 seconds). The policy continuously calculates the required capacity using a PID controller to smooth adjustments.
Alarm Breaches
When the metric deviates from the target, the CloudWatch alarm enters ALARM state. For Target Tracking, the scale-out alarm triggers if the metric exceeds the target for a sustained period (default 3 evaluation periods). For Step and Simple, you define the alarm threshold manually. The alarm must be in ALARM state for the policy to execute a scaling action.
Policy Evaluates Adjustment
For Target Tracking, the policy calculates a new desired capacity using the formula: desired_capacity = current_desired_capacity * (current_metric_value / target_value). For Step Scaling, it identifies which step interval the current metric falls into and applies the corresponding adjustment. For Simple Scaling, it applies the fixed adjustment. The adjustment can be an absolute number, a percentage, or a change in capacity.
Execute Scaling Action
The ASG updates its desired capacity. If the new desired capacity is greater than the current, it launches new instances. If smaller, it terminates instances. The ASG respects the minimum and maximum size limits. For Target Tracking, if the calculated capacity would exceed the max size, it caps at max; similarly for min. The policy also records the activity in CloudTrail.
Cooldown / Stabilization
After a scaling action, Target Tracking enters a stabilization period (default 300 seconds) during which it does not trigger further scaling actions. This prevents oscillations. For Step and Simple, a cooldown period (configurable, default 300 seconds) prevents the policy from responding to additional alarm breaches. During cooldown, the policy ignores new alarm transitions. After cooldown, if the alarm is still in ALARM state, the policy may trigger again.
Enterprise Scenario 1: E-commerce Web Tier
A large e-commerce platform uses Target Tracking scaling for their web tier based on average CPU utilization. They set the target to 40% to ensure enough headroom for traffic spikes. During Black Friday, traffic surges 10x. The Target Tracking policy continuously adjusts capacity, launching hundreds of instances. The stabilization period prevents overreaction when a new instance starts and initially has low CPU. Without Target Tracking, they would have used Step Scaling, but the PID-like control of Target Tracking provides smoother scaling. They also use a custom metric for request count per target to handle sudden shifts in traffic patterns.
Enterprise Scenario 2: Batch Processing with Step Scaling
A data processing company runs batch jobs that cause CPU to spike to 90% for short periods. They use Step Scaling with two steps: if CPU exceeds 80% but less than 95%, add 2 instances; if CPU exceeds 95%, add 5 instances. This allows them to respond proportionally. They set a cooldown of 120 seconds because instances become operational quickly. The downside is that if CPU oscillates around 80%, they may see repeated scaling actions. They mitigated this by using a longer alarm evaluation period (3 periods of 60 seconds) to avoid flapping.
Enterprise Scenario 3: Legacy Application with Simple Scaling
A legacy application has predictable load patterns: every morning at 9 AM, traffic increases by about 20%. They use Simple Scaling with a scheduled action to add 2 instances at 8:45 AM, and a separate Simple Scaling policy to remove instances when CPU drops below 20% at night. They use a cooldown of 600 seconds to avoid premature scale-in. However, they found that Simple Scaling was insufficient for handling unexpected spikes because it only adds a fixed number of instances. They migrated to Target Tracking for better responsiveness.
Common Misconfigurations
Setting cooldown too short: Leads to rapid scaling actions and oscillation.
Using Simple Scaling for variable workloads: Results in under- or over-provisioning.
Not using a health check grace period: Causes premature instance replacement during bootstrapping.
Mixing policy types incorrectly: For example, having both Target Tracking and Step Scaling on the same metric can cause conflicts. AWS allows multiple policies, but they can interfere. Best practice is to use only one policy type per ASG, or use separate metrics.
What the Exam Tests
Objective 2.1: 'Implement and manage Auto Scaling policies.' The exam expects you to know the differences between Target Tracking, Step, and Simple scaling policies, when to use each, and how to configure them. Specific sub-objectives include: - 2.1.1: Determine when to use Target Tracking vs Step vs Simple. - 2.1.2: Configure scaling policies using the AWS Management Console, CLI, or CloudFormation. - 2.1.3: Troubleshoot scaling issues (e.g., why instances are not scaling).
Common Wrong Answers
'Simple Scaling is better because it has no cooldown.' Reality: Simple Scaling always has a cooldown; Target Tracking does not use a cooldown but uses a stabilization period. Candidates confuse cooldown and stabilization.
'Step Scaling can only add instances, not remove.' Reality: Step Scaling can both scale out and scale in, depending on the alarm (e.g., a scale-in alarm with negative adjustments).
'Target Tracking requires manual creation of CloudWatch alarms.' Reality: AWS automatically creates the alarms for Target Tracking. Candidates think they need to create alarms manually like for Step/Simple.
'You can have multiple Target Tracking policies on the same ASG.' Reality: Only one Target Tracking policy per ASG is allowed. However, you can have multiple Step or Simple policies (e.g., one for scale-out, one for scale-in).
Specific Numbers and Values
Default cooldown: 300 seconds.
Default stabilization period: 300 seconds.
Target Tracking predefined metrics: ASGAverageCPUUtilization, ASGAverageNetworkIn, ASGAverageNetworkOut, ALBRequestCountPerTarget.
Maximum number of Target Tracking policies per ASG: 1.
Step adjustments: Must have at least one step. The intervals are defined by MetricIntervalLowerBound and MetricIntervalUpperBound.
Adjustment types: ChangeInCapacity, ExactCapacity, PercentChangeInCapacity.
Edge Cases
If the ASG is at the minimum size and a scale-in policy triggers, it will not reduce below the minimum.
If the metric is missing data points, the policy may not trigger. The alarm must have a treat missing data setting (e.g., 'breaching' or 'notBreaching').
For Target Tracking, if the metric value is zero, the calculated desired capacity would be zero, but the ASG will not go below the minimum size.
Step Scaling with ExactCapacity: Sets the desired capacity to a specific number, ignoring the current capacity.
How to Eliminate Wrong Answers
If a question asks about a policy that automatically creates alarms, it is Target Tracking.
If the question mentions cooldown and fixed adjustments, it is Simple or Step.
If the question describes different responses based on severity, it is Step.
Always check the number of policies allowed: only one Target Tracking per ASG.
Target Tracking is the recommended default policy because it is self-managing and uses a PID-like controller for smooth scaling.
Only one Target Tracking policy can be attached to an Auto Scaling group at a time.
Step Scaling allows you to define different responses based on the severity of the metric breach, using step adjustments.
Simple Scaling executes a single fixed adjustment per alarm breach and then waits for a cooldown period.
Cooldown period for Simple and Step is 300 seconds by default; it prevents the policy from triggering again too soon.
Target Tracking uses a stabilization period (default 300 seconds) instead of a cooldown.
For Target Tracking, you can use predefined metrics (e.g., ASGAverageCPUUtilization) or custom metrics via CustomizedMetricSpecification.
Step and Simple scaling support adjustment types: ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity.
When using Step Scaling, the alarm's metric must be the same as the metric used in the step adjustments (unless you use separate alarms).
The exam often tests the difference between cooldown and stabilization period—remember Target Tracking uses stabilization, not cooldown.
These come up on the exam all the time. Here's how to tell them apart.
Target Tracking
Automatically creates CloudWatch alarms
Uses stabilization period (default 300s) instead of cooldown
Continuously adjusts capacity to maintain target metric
Only one policy per ASG allowed
Best for steady-state workloads with predictable patterns
Step Scaling
Requires manual creation of CloudWatch alarms
Uses cooldown period (default 300s) between actions
Responds with discrete steps based on metric magnitude
Multiple policies allowed (e.g., separate scale-out and scale-in)
Best for workloads with sudden spikes requiring proportional response
Mistake
Target Tracking policy uses a cooldown period like Simple and Step.
Correct
Target Tracking uses a stabilization period (default 300 seconds) instead of a cooldown. The stabilization period prevents scaling actions immediately after a previous action, but it is not a cooldown—it is a period during which the policy evaluates but does not act if the metric is still within a margin.
Mistake
Step Scaling can only use absolute capacity adjustments.
Correct
Step Scaling supports ChangeInCapacity, ExactCapacity, and PercentChangeInCapacity. You can add or remove a fixed number, set to an exact number, or change by a percentage.
Mistake
You can have multiple Target Tracking policies on the same Auto Scaling group.
Correct
AWS allows only one Target Tracking policy per ASG. However, you can have multiple Step or Simple policies (e.g., one for scale-out, one for scale-in).
Mistake
Simple Scaling does not require a cooldown period.
Correct
Simple Scaling always requires a cooldown period (default 300 seconds). It cannot be set to zero. The cooldown prevents the policy from reacting to another alarm breach until it expires.
Mistake
Target Tracking policy requires you to create CloudWatch alarms manually.
Correct
When you create a Target Tracking policy, AWS automatically creates the necessary CloudWatch alarms (one for scale-out, one for scale-in) and manages them. You do not need to create them manually.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Target Tracking automatically creates alarms and continuously adjusts capacity to keep a metric at a target value, using a stabilization period to prevent oscillations. Step Scaling requires manual alarms and applies a fixed adjustment based on which step interval the metric falls into, using a cooldown period. Target Tracking is simpler and recommended for most workloads; Step Scaling gives more control for different severity levels.
Yes, you can have one Target Tracking policy and multiple Step/Simple policies on the same ASG. However, they may interfere with each other. For example, if both scale out, you might add more instances than needed. AWS recommends using only one type of scaling policy per metric to avoid conflicts. In practice, use Target Tracking as the primary and avoid mixing with Step on the same metric.
Yes, Simple Scaling always requires a cooldown period. The default is 300 seconds. You cannot set it to zero. The cooldown prevents the policy from triggering another scaling action until the cooldown expires, even if the alarm remains in ALARM state.
Check the CloudWatch alarm state—if it is not in ALARM, the policy won't trigger. Verify the alarm's threshold, period, and evaluation periods. Ensure the ASG has not reached its minimum or maximum size. Check the scaling policy's cooldown or stabilization period—if it is still in effect, new actions are blocked. Also check CloudTrail for any errors.
If the metric value is zero, the calculated desired capacity would be zero (since desired = current * (0/target) = 0). However, the ASG will not scale below its minimum size. So if the minimum is 1, the desired capacity stays at 1. The policy will not scale in below the minimum.
Yes, you can use a custom metric by specifying a CustomizedMetricSpecification in the Target Tracking configuration. You must provide the metric name, namespace, and dimensions. The metric must be a valid CloudWatch metric that represents the load on the instances.
Only one Target Tracking policy is allowed per Auto Scaling group. This is a hard limit. If you need multiple scaling policies, use Step or Simple for additional ones.
You've just covered Auto Scaling Policies: Target Tracking, Step, Simple — now see how well it sticks with free SOA-C02 practice questions. Full explanations included, no account needed.
Done with this chapter?