Comprehensive Study Guide: AWS Pricing Models and Cost Optimization
Pricing models (for example, Reserved Instances, AWS Savings Plans)
Comprehensive Study Guide: AWS Pricing Models and Cost Optimization
This guide covers the essential pricing strategies required for the AWS Certified Solutions Architect - Professional (SAP-C02) exam, focusing on the trade-offs between flexibility, cost, and commitment.
Learning Objectives
After studying this guide, you should be able to:
- Analyze application usage patterns to determine the most cost-effective pricing model.
- Differentiate between Reserved Instances (RIs) and AWS Savings Plans (SPs).
- Evaluate the impact of payment options (No Upfront, Partial Upfront, All Upfront) on total cost of ownership (TCO).
- Design a cost-optimization strategy that combines Spot, On-Demand, and committed capacity.
Key Terms & Glossary
- On-Demand: A pay-as-you-go model with no long-term commitment. Best for unpredictable or short-term workloads.
- Reserved Instances (RI): A commitment to use a specific instance type in a specific region for 1 or 3 years in exchange for a significant discount.
- Savings Plans: A flexible pricing model that offers low prices in exchange for a commitment to a consistent amount of usage (measured in $/hour).
- Spot Instances: Spare AWS capacity available at up to 90% off, which can be reclaimed by AWS with a 2-minute notice.
- Tenancy: Defines how EC2 instances are distributed on physical hardware (e.g., Shared, Dedicated, or Dedicated Host).
The "Big Idea"
Cost optimization in AWS is a balancing act between Predictability and Flexibility. If your workload is predictable (Steady State), you trade flexibility for massive savings via commitments (RIs/Savings Plans). If your workload is unpredictable (Spiky/Variable), you pay a premium for the flexibility of On-Demand or use Spot for fault-tolerant tasks.
Formula / Concept Box
| Commitment Variable | Impact on Discount |
|---|---|
| Term Length | 3-year commitments offer significantly higher discounts than 1-year terms. |
| Payment Option | All Upfront > Partial Upfront > No Upfront (in terms of savings). |
| Flexibility | Higher flexibility (Compute Savings Plans) usually results in slightly lower discounts than rigid models (EC2 Instance Savings Plans). |
Hierarchical Outline
- On-Demand Pricing
- Best for: New applications, spiky workloads, and short-term jobs.
- Benefit: Zero commitment; per-second billing.
- Reserved Instances (RI)
- Types: Standard RIs vs. Convertible RIs.
- Limitations: Historically tied to specific instance families and regions.
- AWS Savings Plans
- Compute Savings Plans: Broadest flexibility; applies to EC2, Fargate, and Lambda across regions.
- EC2 Instance Savings Plans: Tied to a specific instance family in a region but allows for OS and Tenancy changes.
- Spot Instances
- Best for: Stateless, fault-tolerant, or batch-processing workloads.
- Risk: Interruption by AWS.
Visual Anchors
Pricing Model Decision Tree
Cost vs. Predictability Mapping
Definition-Example Pairs
- Compute Savings Plans: A commitment to a $/hr spend that applies regardless of Region, Instance Family, or Compute Service.
- Example: A company moves half its workload from EC2 in
us-east-1to Lambda ineu-west-1; the Savings Plan discount follows the usage automatically.
- Example: A company moves half its workload from EC2 in
- Spot Instances: Using excess AWS capacity for massive discounts with the risk of termination.
- Example: A genomic sequencing lab runs large batch data processing jobs that can be paused and resumed at any time.
Worked Examples
Scenario: m5.large in Stockholm
Based on the source data, let's compare the 3-year costs for an m5.large instance:
- On-Demand: $0.102 / hr $74.46 / month. Over 3 years: $2,680.56.
- Standard RI (Full Upfront): $1,008.
- Compute Savings Plan (Full Upfront): $1,392.84.
- EC2 Instance Savings Plan (Full Upfront): $998.64.
[!IMPORTANT] Notice that the EC2 Instance Savings Plan actually provides the highest discount ($998.64) but is restricted to the m5 family, whereas the Compute Savings Plan costs more ($1,392.84) but offers the flexibility to switch to Lambda or Fargate.
Checkpoint Questions
- Which pricing model would you choose for a web application with a steady baseline of 10 instances and periodic spikes of 50 instances during sales?
- Answer: Use Savings Plans or RIs for the 10 baseline instances and On-Demand for the 40-instance spikes.
- What is the primary difference between Compute Savings Plans and EC2 Instance Savings Plans?
- Answer: Compute SPs apply across EC2, Fargate, and Lambda regardless of region or family; EC2 Instance SPs are restricted to a specific family and region.
- Does an "All Upfront" payment provide a larger discount than "No Upfront"?
- Answer: Yes, All Upfront provides the maximum possible discount by paying for the entire commitment at once.
Muddy Points & Cross-Refs
- RI vs. Savings Plans: RIs are still available but Savings Plans are generally recommended for new workloads due to their easier management and broader application.
- Regional vs. Zonal RIs: Regional RIs provide availability zone flexibility but do not provide a capacity reservation; Zonal RIs reserve capacity but are fixed to one AZ.
- Related Concepts: For a full strategy, cross-reference this with AWS Compute Optimizer for right-sizing and Cost Explorer for anomaly detection.
Comparison Tables
| Feature | Standard RI | Compute Savings Plan | EC2 Instance Savings Plan |
|---|---|---|---|
| Commitment | Instance Type/Region | $/Hour Spend | Family/Region |
| EC2 Support | Yes | Yes | Yes |
| Fargate/Lambda | No | Yes | No |
| Region Flexibility | No (Fixed) | Yes | No (Fixed) |
| Max Discount | ~75% | ~66-72% | ~72% |