Skip to content
BytePatterns

AWS Cost Levers

AWS for Interviews: lesson 11 of 18

Right-size, scale, commit the floor, Spot the rest, watch the wires.

Lesson 11 of 18 · 6 min

AWS Cost Levers

Step 1 of 10

One service's day in two-hour blocks. Each bar is how many instances that block actually needs.

The Idea

Pull the levers in order. Switch off what idles and right-size: Compute Optimizer flags over-provisioned instances. Scale with demand. Commit the steady floor with Savings Plans or Reserved Instances. Put interruptible work on Spot — spare capacity at steep discounts that EC2 can reclaim with a two-minute notice. Then watch data transfer.

Real-World Example

A service needs three instances all day and nine at its peak. An Auto Scaling group follows the curve, a Savings Plan covers the three, peaks stay On-Demand, and the nightly batch runs on Spot, checkpointing so an interruption costs minutes, not the job.

The Tradeoff

A commitment only pays off on usage you keep, so commit to the floor you measured, not the peak you hope for. NAT gateways bill per GB processed; send S3 and DynamoDB traffic through gateway endpoints.

Hands-On

# illustrative — needs Compute Optimizer enabled and Cost Explorer access
aws compute-optimizer get-ec2-instance-recommendations \
  --filters name=Finding,values=Overprovisioned
aws ce get-cost-and-usage \
  --time-period Start=2026-09-01,End=2026-10-01 \
  --granularity MONTHLY --metrics UnblendedCost \
  --group-by Type=DIMENSION,Key=SERVICE

Your turn

Put the steps in the right order.

  1. Move interruptible batch work to Spot
  2. Commit to the steady baseline with a Savings Plan
  3. Scale the fleet with demand
  4. Turn off idle resources and right-size the rest

Mini quiz

1 / 3

Which workload suits Spot Instances?

Sources

New lessons land every few weeks

Leave an address and we will tell you when the next one is up. That is the only reason we will use it.

One address, stored so we can email you. Nothing else, ever.