All guides
Practice now
D4 · Cost optimization

Compute costs: Reserved, Spot, and Savings Plans

20% of the exam (D4) tests how to optimize costs. For compute, the key is choosing the right pricing model for the usage pattern: (flexibility), Reserved/Savings Plans (steady load), Spot (interruption-tolerant).

Icon-Architecture/48/Arch_Amazon-EC2_48

pricing models

EC2 has 5 pricing models. The exam presents a usage scenario and asks you to identify the most cost-efficient one.

On-Demand

0%None

Best for

New apps, unpredictable workloads, short dev/test cycles, occasional spikes

Don't use when

Steady 24/7 workloads — this is the most expensive option here

Reserved Instances (1 year)

Up to 40%1 year

Best for

Web servers, production databases with predictable steady load

Don't use when

Variable workloads or instances that might not run all year

Reserved Instances (3 years)

Up to 72%3 years (All Upfront)

Best for

Critical infrastructure that will definitely run for 3 years. DBs, NAT Gateways.

Don't use when

If there is uncertainty about the 3-year need

Savings Plans

Up to 66% (Compute) / 72% (EC2)1 or 3 years ($/hour)

Best for

Organizations that want instance-type flexibility while keeping Reserved-level savings

Don't use when

If you need per-instance-specific savings (EC2 RIs can give a deeper discount)

Spot Instances

Up to 90%None (but can be reclaimed)

Best for

Batch jobs, ML training, data processing, rendering, CI/CD — INTERRUPTION-TOLERANT

Don't use when

Applications with persistent state, databases, apps that cannot restart

Icon-Architecture/48/Arch_Amazon-EC2_48

Savings Plans vs Reserved Instances

TypeApplies toFlexibilityMax discount
Compute Savings PlansEC2 (any family/region), Lambda, FargateMaximum — any instance type, region, OSUp to 66%
EC2 Instance Savings PlansEC2 (specific family in one region)Medium — only the committed family/regionUp to 72%
Standard Reserved InstancesEC2 (specific type, AZ, OS)Low — fixed type, can be sold on the MarketplaceUp to 72%
Convertible Reserved InstancesEC2 (can change family/OS)Medium — convertible to other familiesUp to 54%

AWS recommendation

AWS recommends Compute Savings Plans for most workloads: more flexible than Reserved Instances (automatically applies to EC2, Lambda, and Fargate), competitive discount, and it doesn't "lock" you into a specific family/region. Reserved Instances only make sense when you need a specific AZ (Capacity Reservation).

Icon-Architecture/48/Arch_Amazon-EC2_48

Spot Instance strategies

Spot Fleet — pool diversification

Spot Fleet lets you specify multiple instance types and AZs. AWS picks the pool with the best price/availability. If one type runs out, it launches from another pool automatically.

lowestPrice strategy

Maximizes savings — picks the cheapest pool at every moment.

diversified strategy

Spreads across multiple pools — better availability, fewer simultaneous interruptions.

Spot Instance interruptions

When AWS needs the capacity back, it gives a 2-minute warning. Your app must handle this with checkpoints or a stateless design.

Best practices:

• Save progress every few minutes (checkpoints to S3)

• Design idempotent tasks (able to restart)

• Use an ASG with an EC2 Spot + On-Demand mix

ASG with Spot mix (recommended)

ASG with MixedInstancesPolicy: e.g. 20% On-Demand (guaranteed baseline) + 80% Spot (maximum savings). If Spot is interrupted, the ASG temporarily launches On-Demand.

Icon-Architecture/48/Arch_AWS-Compute-Optimizer_48

Rightsizing and Compute Optimizer

Rightsizing = matching instance type/size to actual usage. The most common mistake: provisioning m5.4xlarge instances for workloads that use 10% CPU — an m5.large is enough and 8x cheaper.

AWS Compute Optimizer

Analyzes 14 days of metrics and recommends the optimal instance type. Supports EC2, Auto Scaling Groups, EBS, and Lambda.

  • •Identifies over-provisioned and under-provisioned instances
  • •Shows the estimated savings from resizing
  • •Accounts for usage patterns (not just the average)

When NOT to rightsize

    Occasional traffic spikes

    A smaller instance can get saturated at the peak — use an ASG instead.

    DBs with expected growth

    Better to provision with headroom to avoid migrating frequently.

    Legacy applications with licenses

    Some licenses are billed per vCPU — verify before downsizing.

Icon-Architecture/48/Arch_Amazon-EC2_48

and optimization

Lambda — cost optimization

Tune memory

Lambda allocates CPU proportional to memory. More memory = more CPU = can be cheaper if it reduces duration.

ARM/Graviton2

ARM Lambda functions are ~20% cheaper and 10% faster than x86. Migrate if the code is compatible.

Compute Savings Plans

Savings Plans automatically apply to Lambda — no extra configuration needed.

Reduce cold starts

Provisioned Concurrency has a fixed cost — calculate whether it is worth it vs. the UX cost of cold starts.

Fargate — cost optimization

Fargate Spot

Fargate Spot = Spot Instances for /EKS containers. Up to 70% discount for interruption-tolerant tasks.

Right-size containers

Define vCPU and memory precisely. Don't request 4 vCPUs for a container that uses 0.5.

Compute Savings Plans

Also apply to Fargate. A $/hour commitment cuts costs by up to 50%.

ARM/Graviton2

ECS Fargate supports ARM — 20% savings for the same performance.

Did you get this topic?

Test what you just learned

A company has a fleet of 50 m5.4xlarge instances running log-analysis applications that process data in batches overnight (6 hours). The jobs can restart if interrupted. Which is the most cost-effective strategy?

Ready to test "Compute costs: Reserved, Spot and Savings Plans"?

Put what you learned to the test with original SAA-C03 exam questions.

Start SAA-C03 mock exam

Unlimited mock exams with the Pro plan

Log in to track your progress.