Skill 3.2.2

Identifying metrics and conditions to perform scaling actions

Key Concepts

Target tracking keeps a metric at a target (average CPU 50%, ALBRequestCountPerTarget 1,000, or a custom metric such as SQS backlog per instance). Step scaling adds or removes capacity in steps based on alarm breach size. Scheduled scaling changes capacity at known times. Predictive scaling uses machine learning on history to scale ahead of recurring daily or weekly patterns.

For queue workers, publish a custom metric: ApproximateNumberOfMessagesVisible / running instances and target the backlog each instance can process within the acceptable latency. Memory is not published by default; install the CloudWatch agent to scale on it.

Tune instance warm-up and cooldowns so new instances are not counted before they serve traffic, use warm pools to keep pre-initialized instances ready for applications with long start-up times, and use lifecycle hooks to run setup or draining scripts.