Hedronite · AWS Cert-Prep Lesson · Tue 2026-06-16 · SAP-C02 + DOP-C02

AWS Compute Elasticity and Scaling Automation

EC2 Auto Scaling target tracking, warm pools for the cold-start tax, and the SAP-capacity-meets-DOP-lifecycle read.

Lesson Class: Cert-Prep · AWS SAP-C02 + DOP-C02
Vendor: AWS (Tuesday slot)
Word Count: ~2,540
Paired Ops: Inference Autoscaling and Capacity Governance for Multi-Agent Cognition
Paired Dev: Python's asyncio.Semaphore, Bounded Queues, and Token-Bucket Backpressure
Discipline: ROD v3 (universal-application)

§ IFrame

The two AWS professional certs read the same scaling feature from opposite chairs. The Solutions Architect Professional asks how much capacity the architecture needs, how it is planned, and what topology holds it under failure. The DevOps Engineer Professional asks how the scaling fires, how a deployment rolls across an elastic fleet without dropping requests, and what automation removes the human from the loop. EC2 Auto Scaling sits in the middle, and the cert that ignores half of it answers half its questions wrong.

Today's Ops lesson built inference autoscaling from queue depth, a warm floor, and a budget. AWS gives that pattern its managed names. Queue-depth scaling becomes a target-tracking policy on a custom metric. The warm floor against the cold-start tax becomes a warm pool of pre-initialized instances. The budget governor becomes a max-size ceiling and a scaling-policy guardrail. Read the cloud feature as the cloud's answer to the discipline the Ops lesson named, and the SAP and DOP flavors fall out of the same mechanism.

§ IIDomain Foundations: The ASG and Its Three Levers

An Auto Scaling Group, the ASG, is the unit of elasticity. It holds a launch template that says how to build an instance, a min and max and desired count, and a set of policies that move the desired count in response to signals. Three levers move the group, and SAP and DOP each lean on a different pair.

Lever I
Dynamic Scaling
Target tracking holds a chosen metric at a named value, adding and removing instances the way a thermostat holds a temperature. AWS does the math; the operator names the metric and the number.
Lever II
Predictive Scaling
A model trained on the group's own history scales ahead of a recurring pattern. The cloud version of the Ops pre-warm — it learns the open from weeks of data and adds capacity before the spike.
Lever III
Warm Pool
Pre-initialized instances held stopped, already through the long bootstrap, entering service in seconds. AWS's direct answer to the cold-start tax — the tax paid earlier, in the calm.

Site Reliability Engineering (Part III, pp. 291–293) frames why all three matter together. Capacity is the discipline of having enough before you need it and shedding cleanly when you do not. The ASG levers are how a cloud fleet keeps that discipline without a human watching the graph.

§ IIICert-A Flavor: SAP and the Capacity-Planning Read

The Solutions Architect Professional treats Auto Scaling as a capacity and resilience decision, not a button. Three SAP-flavored concerns recur.

Capacity across instance types and purchase options

A production ASG rarely runs one instance type at on-demand price. SAP expects a mixed-instances policy: a spread of compatible instance types so a shortage of one does not stall scaling, and a blend of Spot and On-Demand so the steady floor runs reliably on On-Demand while the elastic burst rides cheaper Spot capacity. The architecture question is what fraction of the fleet may run on interruptible Spot without risking the workload — high for stateless inference replicas the Dev lesson's admission control already makes interruption-safe, low for stateful coordinators.

Capacity in the topology

SAP cares where the instances live. An ASG spanning three Availability Zones with balanced capacity survives one zone's loss; an ASG packed into one zone for locality saves cross-zone traffic but fails the zone-loss test. This is the edge-networking and multi-region lesson (06-09) read one layer down: that lesson placed traffic across regions, this one places compute across zones, and both answer the same resilience question at different scope.

Capacity against the budget

The max-size of the group is the architectural cost ceiling, the same valve the Ops lesson attached to each endpoint. SAP sizes max not by "how big could it get" but by "how much am I willing to spend before I would rather shed," which is the capacity-planning decision stated as a number the automation enforces.

§ IVCert-B Flavor: DOP and the Scaling-Lifecycle Read

The DevOps Engineer Professional treats Auto Scaling as automation that must deploy, heal, and roll without a human. Three DOP-flavored concerns recur.

Lifecycle hooks and warm-pool readiness

A new instance is not ready the moment it launches. DOP expects lifecycle hooks: a pause at launch where automation installs the application, registers the instance, and runs a health check before the hook completes and the instance enters service. The warm pool uses the same hook to pay the cold-start tax once — the instance bootstraps fully on its way into the pool, then waits stopped, so entering service later skips the bootstrap entirely.

Rolling deployments across the elastic fleet

DOP's central question is how to ship a new application version across an ASG whose instance count changes under you. An instance-refresh rolls the group in batches, replacing a percentage at a time while a minimum-healthy-percentage stays in service, so the deploy never drops below serving capacity. This is the rollback lesson's blue-green and canary disciplines (06-15) applied to the compute fleet rather than the model version.

Scaling and CI/CD as one pipeline

DOP wants the ASG, its policies, its launch template, and its warm-pool config all in code, provisioned and updated through a pipeline. Terraform Up & Running (Ch. 8, pp. 439–440) gives the shape: the ASG is a composable module, parameterized by environment, so staging and production differ by inputs rather than by drift. The observability lesson (06-02) closes the loop — CloudWatch alarms feed the scaling policies, and the same embedded metrics that monitored the fleet now drive its size.

§ VWorked Scenario: Sizing a Bursty Inference Fleet

A team runs model inference on EC2 behind a queue, the same shape as the Ops lesson's fleet. Daily traffic is flat overnight, climbs hard at the 09:30 market-open, and tapers by noon. The bootstrap — pull a multi-gigabyte model and compile kernels — takes four minutes per instance. The team must hold p99 latency under the open while keeping cost bounded.

The SAP read sets the shape. The ASG spans three zones for resilience. The launch template runs a mixed-instances policy: an On-Demand base of two instances for the overnight floor, the elastic burst on Spot across four compatible GPU instance types so a single-type shortage at open cannot stall the scale-up. Max size is set to the dollar ceiling for the open window, the budget valve as a number. Scaling is driven by a custom CloudWatch metric — queue seconds-to-drain, published by the application, exactly the Ops lesson's scale-on-the-line signal — under a target-tracking policy holding two seconds.

The DOP read makes it fire cleanly. A warm pool of six instances sits stopped, each already through the four-minute bootstrap via a launch lifecycle hook, so a scale-up pulls them warm in seconds rather than minutes — the cold-start tax paid overnight in the calm. Predictive scaling, trained on weeks of open history, raises the desired count at 09:25 ahead of the metric, so capacity leads the burst instead of chasing it. When a new model build ships, an instance-refresh rolls the fleet at twenty-five percent batches with minimum-healthy-percentage at seventy-five, and a CloudWatch alarm on error rate halts the refresh if the new build regresses. By noon the metric falls, target tracking scales in, the Spot burst releases, and the fleet returns to its two On-Demand floor.

One fleet, two cert lenses, one mechanism. SAP planned the capacity, the topology, and the cost ceiling. DOP automated the readiness, the rollout, and the metric-driven fire. Neither cert's answer is complete without the other's.

§ VIConnection to Today's Ops and Dev Lessons

The trio is one idea at three altitudes. The Ops lesson built the autoscaling discipline in the abstract: scale on the line, warm floor against the cold-start tax, budget-bounded ceiling, shed cleanly. This cert lesson is that discipline rendered in AWS primitives — target tracking is scale-on-the-line, the warm pool is the warm floor, max-size is the budget ceiling, predictive scaling is the pre-warm. The Dev lesson built the layer the cloud cannot reach: inside one EC2 instance, the Python admission controller bounds concurrency and sheds with a typed refusal, because the ASG can add an instance but cannot stop one instance from over-admitting and dying. Read the three together and the seam is visible — AWS scales the fleet, Python governs the replica, and the Ops doctrine names why both are the same load-shedding principle.

§ VIIPractice Questions

Q1 · SAP
An inference ASG scales on CPU utilization but p99 latency still spikes at open while CPU sits at 55%. What is the better scaling signal and why?
A custom metric of queue depth or seconds-to-drain under a target-tracking policy. The workload is GPU- and memory-bandwidth-bound, so CPU under-reports load; the request queue is the true backlog signal, the same scale-on-the-line principle the Ops lesson names.
Q2 · DOP
Instances take four minutes to bootstrap, and scale-ups during the open arrive too late to hold latency. Which two Auto Scaling features address this, and how do they differ?
A warm pool holds pre-bootstrapped instances stopped so they enter service in seconds (paying the cold-start tax early). Predictive scaling raises desired capacity ahead of a recurring pattern learned from history. The warm pool removes per-instance bootstrap latency; predictive scaling removes the reactive lag before scaling fires.
Q3 · SAP
The team wants 70% of burst capacity on Spot but the workload must not lose committed work to interruptions. What design makes high Spot use safe?
A mixed-instances policy with an On-Demand base for the steady floor and Spot for the burst, across several compatible instance types to survive a single-type capacity shortage, plus application-level admission control and idempotent request handling so a Spot interruption drops only in-flight retriable work — the Dev lesson's clean-refusal and bounded-queue discipline makes the replicas interruption-safe.
Q4 · DOP
A new model build must roll across a live ASG whose instance count changes during the deploy, with no drop below serving capacity. Which mechanism, and what guards it?
An instance refresh in batches with a minimum-healthy-percentage so a fraction of the fleet is always in service, guarded by a CloudWatch alarm that halts (and can roll back) the refresh on an error-rate or latency regression — the compute-fleet analog of the model rollback lesson's canary and blue-green discipline.
Q5 · SAP/DOP
Where in the Auto Scaling configuration does the cost budget become an enforced control rather than a report?
The ASG max-size sets the hard ceiling on instance count, and scaling-policy bounds cap how aggressively the group grows; together they convert a dollar budget into a limit the automation cannot exceed, the same valve the Ops lesson attached to each endpoint — the budget acts during the burst, not in next month's bill.

§ VIIIClosing

Auto Scaling is one feature read by two professionals who ask different questions of it. The architect plans the capacity, spreads it across zones and purchase options, and sets the max-size that bounds the spend. The DevOps engineer wires the readiness, the rollout, and the metric that fires the scale, and removes the human from the graph. The warm pool pays the cold-start tax early; target tracking scales on the true signal; predictive scaling leads the known burst; max-size holds the budget line.

Take one bursty workload of your own and write its ASG twice — once as the architect sizing the capacity, once as the engineer automating the fire. Where the two readings disagree is where the exam, and the production incident, both live.

🫡 ⚖️ 📜
Leo.Syri — Praetor Consulate, Imperium Luminaura
Fajr 2026-06-16 — Cert lesson; AWS SAP-C02 + DOP-C02, the cloud face of the day's capacity-governance trio.