Cost-Optimized Compute
RI vs Savings Plans: the apply order, and why it matters
AWS billing applies discounts in a fixed sequence each hour, and the order changes which mechanism is the right one to buy.
Apply order, every billing hour:
- Reserved Instances are applied first — to any usage that matches the RI's family, region, AZ (if zonal), tenancy, and OS.
- Savings Plans are applied next — to any remaining eligible usage, in the order that maximizes customer savings (highest-discount usage first).
- On-Demand rates apply to whatever is left.
Why this matters for buying decisions:
If you already own RIs that fully cover your baseline (e.g., 10 reserved m5.xlarge), buying a Compute Savings Plan that overlaps that same usage gains you nothing — RIs consume it first, and the Savings Plan sits idle and unutilized.
The right buying order is the inverse: layer Savings Plans on top of un-RI-covered usage, then add RIs only when a specific instance type's utilization is reliably steady over 1-3 years.
Practical pattern:
- Have a steady baseline that's family-locked? Standard or Convertible RIs (highest discount: up to 72%).
- Have a steady baseline that spans EC2 + Fargate + Lambda? Compute Savings Plan (one commitment, three services).
- Have a steady baseline that's EC2-only but instance-family-stable with size flexibility? EC2 Instance Savings Plan (up to 72%, family-locked but size-flexible — m5.large/xl/2xl all count toward the same $/hr commitment).
Further reading: How Savings Plans apply[3].
Spot interruption handling and Spot Fleet allocation strategies
Spot Instances offer up to 90% off On-Demand, but only if the application can absorb the 2-minute termination notice and the variable-capacity reality.
Interruption signals:
- 2-minute termination notice — written to the instance metadata service at
http://169.254.169.254/latest/meta-data/spot/instance-action. Applications should drain in-flight requests, checkpoint state, and deregister from load balancers within this window. - Rebalance recommendation — issued earlier than the termination notice when Spot interruption probability becomes elevated. Acts as a soft warning so applications can proactively migrate work before the 2-minute hard notice arrives.
Spot Fleet allocation strategies:
- capacity-optimized (recommended default) — launches instances from the pool with the lowest predicted interruption rate. Best for long-running workloads where uptime stability matters more than raw $/hr.
- capacity-optimized-prioritized — same, but respects an instance-type priority list. Useful when ML/HPC workloads have a preferred instance type for performance reasons.
- lowest-price — launches from the cheapest pool. Best for short-lived workloads where interruption recovery is fast.
- price-capacity-optimized — a hybrid balancing cost and interruption risk. New default for many Spot consumers.
- diversified — spreads across all configured pools. Maximizes resilience but may not pick the cheapest pool.
Pairing with Mixed Instances Policy: Auto Scaling groups can specify multiple instance types and a Spot/On-Demand split. OnDemandBaseCapacity defines a minimum guaranteed On-Demand floor; OnDemandPercentageAboveBaseCapacity controls the split for capacity above that floor.
Further reading: EC2 Spot Fleet allocation strategies[10].
Compute Optimizer: when it generates recommendations, when it can't
Compute Optimizer analyzes utilization metrics to recommend right-sizing for EC2, Auto Scaling groups, EBS volumes, Lambda, and ECS on Fargate.
Minimum data requirements (these matter for the exam):
- EC2 / Auto Scaling: 30 hours of metrics within the past 14 days; the more history, the better the confidence rating.
- Lambda: ≥50 invocations across at least 14 days. Functions invoked fewer than 50 times in that window receive no recommendation.
- EBS volumes: 30 consecutive hours of metrics.
- ECS on Fargate: 24 hours of metrics over the past 14 days.
If you see an exam question where Compute Optimizer 'cannot generate' or 'has insufficient data' — it's almost always one of these thresholds.
What it recommends:
- Over-provisioned: downsize to a smaller instance/family or reduce memory allocation.
- Under-provisioned: upsize, or switch to a higher-performance family.
- Optimized: no change recommended.
- Inferred workload type (EC2): Compute Optimizer detects whether a workload looks CPU-bound, memory-bound, etc., and may recommend a different family (e.g., m5 → c5 for CPU-heavy patterns, m5 → r5 for memory-heavy).
Enhanced infrastructure metrics: opt-in for memory utilization metrics from CloudWatch Agent — recommendations are sharper because Compute Optimizer can see memory pressure that the default CPU-only metrics miss.
Further reading: AWS Compute Optimizer requirements[9].
Worked example: applying every lever to a 50-instance fleet
Scenario: A SaaS company runs 50 m5.xlarge EC2 instances on-demand in us-east-1 to serve a stateless web tier. Monthly bill: ~$5,800. Workload characteristics: 30 instances are needed 24/7 (baseline traffic), 20 fluctuate with traffic spikes 2-3 hours per day, and a separate set of 10 batch workers process queued jobs nightly.
Apply every lever:
- Baseline 30 instances — predictable, 24/7. Buy 30× 1-year No-Upfront Standard RIs for m5.xlarge in us-east-1. Discount: ~40% → saves ~$1,400/month.
- Spiky 20 instances — variable. Auto Scaling group with Mixed Instances Policy:
OnDemandBaseCapacity=0,OnDemandPercentageAboveBaseCapacity=0, allocation strategycapacity-optimized. Allow m5.xlarge, m5a.xlarge, m4.xlarge, m6i.xlarge as Spot pools. Discount: ~70% on the Spot portion → saves ~$800/month at typical 50% utilization. - Nightly batch workers — fault-tolerant by definition. Pure Spot Fleet with
price-capacity-optimizedstrategy. Discount: ~80% → saves ~$300/month. - Run Compute Optimizer on the entire fleet after 14 days of metrics — likely recommends downsizing some over-provisioned instances to m5.large. Estimated savings: another 15-20%.
Total monthly savings: ~$2,500-2,900, or roughly 45-50% off the original $5,800 — with zero code changes.
What the exam will probe: which lever fits which workload pattern. Memorize the matching, not the percentages.
EC2 pricing mechanisms compared
| Mechanism | Discount vs OD | Commitment | Flexibility | Interruption risk | Best for |
|---|---|---|---|---|---|
| Standard RI | Up to 72% | 1 or 3 yr, instance family + region | Can sell on RI Marketplace | None | Stable, family-locked workloads |
| Convertible RI | Up to 66% | 1 or 3 yr | Exchange family / OS / tenancy | None | Stable but evolving workloads |
| Compute Savings Plans | Up to 66% | 1 or 3 yr, $/hr commitment | Any family, any region, EC2 + Fargate + Lambda | None | Multi-service compute mix |
| EC2 Instance Savings Plans | Up to 72% | 1 or 3 yr, $/hr commitment | Family + region locked, size-flexible | None | Type-stable EC2 with size flexibility |
| Spot | Up to 90% | None | Any instance type, any region | 2-min termination notice | Fault-tolerant batch, CI, stateless web |
| On-Demand | 0% | None | Full | None | Spiky, unpredictable, short-lived |
Decision tree
Sharp facts the exam loves — give these one last read before exam day.
Cheat sheet
Sharp facts the exam loves — scan these before test day.
- Capacity commitment for predictable usage
Steady-state EC2/Fargate/Lambda running >70% of any 1- or 3-year window fits a capacity commitment. Reserved Instances are workload-specific; Savings Plans are usage-based across families. RIs apply BEFORE Savings Plans — buy order matters.
15 questions test this
- A company has both Reserved Instances and Savings Plans covering its Amazon EC2 workloads. A solutions architect needs to understand how…
- A company is planning a 3-year commitment for Amazon EC2 capacity. The finance team wants to minimize the total cost over the 3-year period…
- A company runs a suite of applications across multiple AWS Regions using various EC2 instance families including m5, c5, and r5 instances.…
- A company purchased Standard Reserved Instances for its production workloads running c5.xlarge instances. Due to application changes, the…
- A company runs a stable production workload on Amazon EC2 instances using the m5.xlarge instance type in the us-east-1 Region. The workload…
- A company runs a large fleet of Amazon EC2 instances across multiple instance families including m5, c5, and r5 in the us-east-1 Region.…
- A company runs a stable production workload using m5.xlarge instances in the us-east-1 Region. The workload is expected to run for at least…
- A company runs steady-state production workloads on Amazon EC2 instances using the C5 instance family in a single AWS Region. The company…
- A company has multiple AWS accounts under AWS Organizations with consolidated billing enabled. The company runs steady-state Amazon EC2…
- A solutions architect is reviewing the AWS Cost Explorer recommendations for a company that has significant EC2 usage across multiple…
- A company uses multiple AWS accounts within AWS Organizations. The company has unpredictable workloads across accounts that use various EC2…
- A company runs a large fleet of Amazon EC2 instances across multiple instance families (m5, c5, r5) in several AWS Regions. The company…
- A company has active Standard Reserved Instances for m5.large Linux instances in us-east-1. The company recently purchased a Compute…
- A company is planning to migrate workloads to AWS. The company expects its compute requirements to evolve significantly as it modernizes…
- A company has purchased both Reserved Instances and Savings Plans to reduce EC2 costs. The company uses multiple AWS accounts under AWS…
- Spot for interruption-tolerant work
Spot Instances use AWS spare capacity at up to 90% off On-Demand. 2-minute interruption notice; allocation strategy
price-capacity-optimizedis the modern default. Use for stateless workers, batch, big-data, CI fleets. Never for stateful workloads without checkpointing.- Right-sizing for everyone (Compute Optimizer)
Compute Optimizer analyzes utilization and recommends smaller instances or different families for EC2, EBS, Lambda, ECS-on-Fargate. Lambda recommendations need ≥50 invocations in 14 days. Trusted Advisor surfaces RI / SP recommendations separately.
5 questions test this
- EC2 Auto Scaling mixed instances policy — OnDemandBaseCapacity setting
- A company wants to automate the identification of over-provisioned Amazon EBS volumes and receive recommendations for volume type…
- A company has enabled AWS Compute Optimizer for an AWS account with many Amazon EC2 instances. The solutions architect reviews the Compute…
- A solutions architect is reviewing AWS Compute Optimizer recommendations for EC2 instances. Several instances show a finding classification…
- A solutions architect is reviewing AWS Compute Optimizer findings for a fleet of EC2 instances. Several instances are classified as…
- RIs apply BEFORE Savings Plans — buying order matters
Each billing hour AWS applies discounts in a fixed order: RIs first (to matching family/region/AZ/OS usage), then Savings Plans (to any remaining eligible usage, highest-discount-first), then on-demand. If you already own RIs covering your baseline, a fresh Compute SP overlapping that usage sits idle — the RIs consume the hours first. Buy SPs to cover un-RI-covered usage, then add RIs only for instance types with reliably steady utilization.
5 questions test this
- A media company stores 500 TB of video archive footage in S3 Glacier Deep Archive. A production team urgently needs to retrieve 50 TB of…
- A company uses both Reserved Instances and Savings Plans for cost optimization across multiple AWS accounts in an organization. The company…
- A solutions architect is reviewing the AWS Cost Explorer recommendations for a company that has significant EC2 usage across multiple…
- A company has active Standard Reserved Instances for m5.large Linux instances in us-east-1. The company recently purchased a Compute…
- A company has purchased both Reserved Instances and Savings Plans to reduce EC2 costs. The company uses multiple AWS accounts under AWS…
- Exchangeability ladder: Standard RI < Convertible RI < Compute SP
Standard RI: family-locked, can sell on RI Marketplace if no longer needed. Convertible RI: can exchange for a different family/OS/tenancy without selling. Compute SP: cover EC2 + Fargate + Lambda across any family and any region; the most flexible commitment but slightly lower max discount.
11 questions test this
- A company purchased 1-year Standard Reserved Instances for Amazon EC2 c5.2xlarge instances. After 6 months, the company migrated the…
- A company runs a suite of applications across multiple AWS Regions using various EC2 instance families including m5, c5, and r5 instances.…
- A company purchased Standard Reserved Instances for its production workloads running c5.xlarge instances. Due to application changes, the…
- A company runs a large fleet of Amazon EC2 instances across multiple instance families including m5, c5, and r5 in the us-east-1 Region.…
- A company runs a stable production workload using m5.xlarge instances in the us-east-1 Region. The workload is expected to run for at least…
- A company wants to reduce costs for its containerized workloads running on Amazon ECS with AWS Fargate. The workloads include both…
- A company runs steady-state production workloads on Amazon EC2 instances using the C5 instance family in a single AWS Region. The company…
- A company has multiple AWS accounts under AWS Organizations with consolidated billing enabled. The company runs steady-state Amazon EC2…
- A company uses multiple AWS accounts within AWS Organizations. The company has unpredictable workloads across accounts that use various EC2…
- A company runs a large fleet of Amazon EC2 instances across multiple instance families (m5, c5, r5) in several AWS Regions. The company…
- A company is planning to migrate workloads to AWS. The company expects its compute requirements to evolve significantly as it modernizes…
- Spot allocation:
price-capacity-optimizedis the modern default lowest-price[10] minimizes hourly cost but maximizes interruption risk (cheapest pools are reclaimed first).capacity-optimizedlaunches from the pool with lowest predicted interruption — best for long-running workloads.price-capacity-optimized(current AWS default for Fleet/ASG) balances both. For HPC/ML with instance-type preferences,capacity-optimized-prioritizedrespects your priority list.4 questions test this
- A company uses Amazon EC2 Auto Scaling with a mixed instances policy for a containerized microservices application. The application is…
- A solutions architect is designing a cost-optimized architecture for a stateless web application that runs on Amazon EC2 instances behind…
- A company is running a stateless web application on Amazon EC2 instances behind an Application Load Balancer. The application can tolerate…
- A company runs a fault-tolerant image processing application on Amazon EC2 instances in an Auto Scaling group. The application can tolerate…
- Lambda Compute Optimizer needs ≥50 invocations in 14 days
Below 50 invocations / 14 days[9], Lambda functions get NO Compute Optimizer recommendation. Exam pattern: 'Compute Optimizer cannot generate a recommendation' for a low-traffic Lambda → root cause is this threshold, not a configuration issue.
- Graviton is the answer when 'reduce cost' meets x86-agnostic
AWS Graviton (ARM64) instances[11] deliver up to 40% better price-performance vs comparable x86. Most managed services support Graviton (RDS, Aurora, ElastiCache, Lambda, Fargate). When the question says 'reduce cost' and doesn't restrict architecture, Graviton is usually a correct answer.
- Fargate Spot: deep discount vs Fargate on-demand; same 2-min notice
Fargate Spot[12] uses spare ECS Fargate capacity at deep discount. Same 2-minute interruption notice as EC2 Spot. Good for: CI builds, fault-tolerant containerized batch, dev/test. Mixed capacity provider:
FARGATEfor baseline +FARGATE_SPOTfor burst.5 questions test this
- A company is running batch processing workloads on Amazon ECS with Fargate Spot to reduce costs. The processing jobs take up to 90 seconds…
- A company runs a containerized batch processing application on Amazon ECS. The application processes non-critical data and can tolerate…
- A company wants to reduce costs for its containerized workloads running on Amazon ECS with AWS Fargate. The workloads include both…
- A company runs a customer-facing web application on Amazon ECS with AWS Fargate. The application must maintain high availability while…
- A company is migrating a containerized data analytics application from on-premises to AWS. The application processes large datasets…
- Trusted Advisor surfaces RI / SP recommendations
Free Trusted Advisor[13] checks include "underutilized EC2 instances" (right-sizing), "RI optimization", and "Savings Plans recommendations" — once you have ~30 days of usage. Business / Enterprise support tier unlocks the full check set.
- Capacity Rebalancing: proactively replaces at-risk Spot Instances before the 2-minute notice
When Capacity Rebalancing is enabled on an Auto Scaling group, it responds to EC2 instance rebalance recommendation signals — which arrive before the 2-minute interruption notice — by launching a replacement instance proactively. Pair it with lifecycle hooks to allow in-flight requests to drain gracefully before the old instance terminates.
4 questions test this
- A company uses Amazon EC2 Auto Scaling with a mixed instances policy for a containerized microservices application. The application is…
- A company runs a containerized application on Amazon EC2 instances using an Auto Scaling group with a mixed instances policy. The Auto…
- A company runs a containerized web application on Amazon EC2 instances in an Auto Scaling group using a mixed instances policy with Spot…
- A company operates a web application behind an Application Load Balancer with an Auto Scaling group using a mixed instances policy. The…
- Compute Optimizer: paid Enhanced Infrastructure Metrics extends lookback to 93 days for cyclical workloads
By default Compute Optimizer analyses 14 days of CloudWatch metrics, which misses monthly or quarterly utilization spikes. The Enhanced Infrastructure Metrics paid add-on extends the lookback period to up to 93 days, enabling accurate recommendations for workloads with cyclical billing or processing patterns.
4 questions test this
- A company is using AWS Compute Optimizer to analyze its EC2 instances for rightsizing opportunities. The company has workloads that…
- A company runs hundreds of Amazon EC2 instances that host applications with monthly billing cycles. The company has opted in to AWS Compute…
- A company has hundreds of Amazon EC2 instances running across multiple AWS Regions. The operations team notices that many instances appear…
- A company operates 200 EC2 instances running a financial application with monthly billing cycles. The instances experience significant…
- Compute Optimizer: org-level preferences, no Spot recommendations, RDS MySQL supported
Recommendation preferences (approved instance families, CPU headroom, lookback period) configured from the management account automatically propagate to all member accounts in an AWS Organization, minimizing per-account overhead. Compute Optimizer does NOT generate rightsizing recommendations for Spot Instances. It does support RDS MySQL and PostgreSQL (with Performance Insights) alongside EC2, Lambda, EBS, and ECS.
4 questions test this
- A company is evaluating AWS tools to identify rightsizing opportunities for their Amazon RDS for MySQL databases that are running on…
- A company manages EC2 instances across multiple AWS accounts in an AWS Organization. The operations team wants to configure AWS Compute…
- A company operates hundreds of Amazon EC2 instances across multiple AWS accounts within an AWS Organization. The company's cloud operations…
- A company uses Amazon EC2 Spot Instances for its batch processing workloads and On-Demand Instances for its production web applications.…
- Zonal RIs provide a billing discount AND a capacity reservation in that specific AZ
A Regional Reserved Instance applies a billing discount across all AZs in a Region but does NOT reserve capacity. A Zonal Reserved Instance scoped to a specific Availability Zone provides both the billing discount and a guaranteed capacity reservation matching the instance attributes, ensuring instances can launch even during peak demand in that AZ.
4 questions test this
- A company runs a mission-critical application on Amazon EC2 instances in a specific Availability Zone. The company requires guaranteed…
- A company operates mission-critical applications on Amazon EC2 in a single Availability Zone. The company requires guaranteed compute…
- A company requires guaranteed EC2 capacity in a specific Availability Zone for a mission-critical application that processes time-sensitive…
- A company runs mission-critical Amazon EC2 instances in us-east-1. The company requires guaranteed capacity in a specific Availability Zone…
- Graviton (ARM) for 20-40% better price-performance
AWS-designed ARM64 processors deliver up to 40% better price-performance vs x86 equivalents. Requires ARM-compatible runtime (most modern languages OK; some Windows AMIs + legacy binaries don't). When the question says "reduce cost" + workload is portable: Graviton.
Also tested in
References
- Amazon EC2 Reserved Instances
- What are AWS Savings Plans
- How Savings Plans apply
- Savings Plans overview (types + flexibility)
- Amazon EC2 Spot Instances
- Spot termination notices + rebalance recommendation
- EC2 Auto Scaling Mixed Instances Groups
- What is AWS Compute Optimizer
- Compute Optimizer requirements
- Spot fleet allocation strategies
- AWS Graviton processor
- Amazon ECS Fargate capacity providers (Fargate Spot)
- AWS Trusted Advisor