This chapter covers EC2 pricing models: On-Demand, Reserved, and Spot Instances. Understanding these options is critical for the SAA-C03 exam, as cost optimization is a major domain (Objective 4.1). Approximately 15-20% of exam questions touch on choosing the right pricing model for given scenarios. You will learn the mechanics, trade-offs, and exam traps for each model.
Jump to a section
Imagine you need compute power like you need a car for a road trip. On-Demand is like renting a car from a daily rental agency. You pay a fixed daily rate, you can return it anytime, and you get the car immediately. It's flexible but expensive per day. Reserved Instances are like leasing a car for 1 or 3 years. You commit to a longer term, so the monthly payment is much lower than renting daily. If you return it early, you pay a penalty (or lose your upfront payment). Spot Instances are like bidding on last-minute rental returns at an auction. You name your price per day. If the auction price (Spot price) is below your bid, you get the car immediately. But if demand spikes and the auction price rises above your bid, you must return the car with just a 2-minute warning. You cannot control when you lose the car, so you only use it for non-critical trips that can be interrupted. In AWS, On-Demand is flexible but costly. Reserved gives a discount for commitment. Spot is cheapest but can be terminated at any moment. The SAA-C03 exam tests when to use each model based on workload characteristics: steady-state, predictable, or fault-tolerant and flexible.
What Are EC2 Pricing Models?
Amazon EC2 offers multiple pricing models to match different usage patterns and cost requirements. The three primary models are On-Demand, Reserved Instances (RI), and Spot Instances. Each has distinct characteristics in terms of cost, commitment, and flexibility. The SAA-C03 exam expects you to recommend the most cost-effective model for a given workload.
On-Demand Instances
On-Demand Instances are billed per second (or per hour for older instances) with no upfront commitment. You pay for compute capacity by the hour or second, depending on the instance type and region. On-Demand is ideal for short-term, irregular, or unpredictable workloads that cannot be interrupted. It is also suitable for applications in development or testing phases.
Key characteristics: - No upfront payment or long-term commitment. - Billed per second (minimum 60 seconds) for Linux instances; per hour for Windows and other OS. - Highest cost per hour among the three models. - Can be launched and terminated at any time. - Capacity is guaranteed as long as the instance is running.
Use cases: - Development and test environments. - Applications with short-term, spiky, or unpredictable usage. - Workloads that cannot be interrupted (no fault tolerance).
Reserved Instances (RI)
Reserved Instances provide a significant discount (up to 72%) compared to On-Demand in exchange for a commitment to a specific instance configuration in a specific region for a 1- or 3-year term. You can choose between three payment options: All Upfront, Partial Upfront, and No Upfront. The more you pay upfront, the greater the discount.
Key characteristics: - Commitment to a specific instance family, size, tenancy, and region (or Availability Zone). - Term: 1 year or 3 years. - Payment options: All Upfront, Partial Upfront, No Upfront. - Standard RIs provide a capacity reservation for a specific AZ; Convertible RIs allow changing instance attributes (family, OS, tenancy) but with lower discounts. - RIs are billed monthly regardless of usage; you pay for the entire term even if you stop or terminate instances. - You can sell unused RIs on the Reserved Instance Marketplace.
Use cases: - Steady-state, predictable workloads (e.g., production databases, web servers). - Applications with long-term capacity requirements. - Workloads where you can commit to a specific instance type and region.
Scheduled Reserved Instances: A subset of RIs that allow you to reserve capacity for a recurring daily or weekly schedule (e.g., 8 AM to 6 PM weekdays). You commit to a 1-year term and pay a discounted rate for the scheduled time slots.
Spot Instances
Spot Instances allow you to bid on unused EC2 capacity at potentially steep discounts (up to 90%) compared to On-Demand. The Spot price fluctuates based on supply and demand. If your bid exceeds the current Spot price, your instance runs; if the Spot price rises above your bid, you receive a 2-minute warning before the instance is terminated. Spot Instances are best suited for fault-tolerant, flexible, and stateless workloads.
Key characteristics: - No commitment; you pay the Spot price per instance-hour (or per second). - Instances can be reclaimed with a 2-minute warning when Spot price exceeds your max bid. - You can set a maximum bid price (default is On-Demand price). - Spot Instances are identical to On-Demand in terms of performance and capabilities. - You can use Spot Blocks to prevent termination for a duration of 1 to 6 hours (limited regions). - You can combine Spot with On-Demand using a Spot Fleet or EC2 Auto Scaling.
Use cases: - Big data, data analytics, and batch processing. - Containerized workloads (e.g., ECS, EKS). - CI/CD pipelines and test environments. - Stateless web servers and microservices. - High-performance computing (HPC) and rendering.
How Pricing Works Internally
On-Demand: Billing is straightforward: you pay the published hourly rate for the instance type multiplied by the number of hours (or seconds) the instance runs. For Linux instances launched after 2017, billing is per second with a 60-second minimum. For Windows and other OS, billing is per hour. There are no hidden charges, but you also pay for data transfer, EBS volumes, and other resources.
Reserved Instances: When you purchase an RI, you are committing to pay for the instance for the entire term, regardless of whether you run it. AWS applies the discount to matching instances running in your account. If you have multiple accounts in an organization, you can share RIs across accounts using Consolidated Billing. The discount is applied at the account level based on instance hours. For example, if you buy 10 Standard RIs for m5.large in us-east-1, any m5.large instance running in us-east-1 in your account (or linked accounts) will be billed at the RI rate, up to 10 instance-hours per hour. Additional instances beyond the RI count are billed at On-Demand rates.
Spot Instances: The Spot market is dynamic. AWS sets a Spot price for each instance type in each Availability Zone. The price changes based on supply and demand. When you request a Spot Instance, you specify a maximum bid (the highest price you are willing to pay per hour). If the current Spot price is below your bid, your instance launches and runs. You are charged the current Spot price, not your bid. If the Spot price rises above your bid, you have 2 minutes to save state before the instance is terminated. You can also choose to stop or hibernate the instance instead of termination (if supported).
Key numbers and defaults: - On-Demand: per-second billing for Linux (60-second minimum). - RI: 1-year or 3-year term; discounts up to 72% (Standard), up to 54% (Convertible). - Spot: up to 90% discount; 2-minute termination warning. - Spot Blocks: 1 to 6 hours (not available in all regions). - Scheduled RI: 1-year term; recurring daily/weekly schedule.
Configuration and Verification
To launch an On-Demand instance, simply choose an AMI, instance type, and other settings; no special configuration is needed. To purchase an RI, use the AWS Management Console, CLI, or SDK. Example CLI command to purchase a Standard RI:
aws ec2 purchase-reserved-instances-offering --reserved-instances-offering-id <offering-id> --instance-count 1To view your RIs:
avs ec2 describe-reserved-instancesTo request a Spot Instance:
avs ec2 request-spot-instances --spot-price "0.05" --instance-count 1 --type "one-time" --launch-specification file://spec.jsonInteraction with Related Technologies
EC2 Auto Scaling: You can mix On-Demand and Spot Instances in an Auto Scaling group to optimize cost and availability. Configure a mixed instances policy with a percentage split (e.g., 70% On-Demand, 30% Spot).
Spot Fleet: A collection of Spot Instances (and optionally On-Demand) that automatically bid across instance types and AZs to meet your target capacity.
Savings Plans: A flexible pricing model that offers lower prices in exchange for a commitment to a consistent amount of compute usage (measured in $/hour) for 1 or 3 years. Savings Plans apply to EC2 instance usage, AWS Lambda, and AWS Fargate. They are more flexible than RIs because they do not require a specific instance type.
Dedicated Hosts: Physical servers dedicated for your use, billed per host. Can be On-Demand or Reserved.
Capacity Reservations: Reserve capacity for On-Demand instances in a specific AZ for any duration. You pay for the reservation regardless of usage.
Exam Traps
Trap: Spot Instances can be terminated by the user at any time. Reality: Spot Instances can be terminated by the user, but AWS can also terminate them when the Spot price exceeds the bid. The key is that AWS can reclaim them with a 2-minute warning.
Trap: RIs are tied to a specific instance ID. Reality: RIs are a billing discount applied to any matching instance in the account; they are not tied to a specific instance.
Trap: Convertible RIs offer the same discount as Standard RIs. Reality: Convertible RIs offer lower discounts (up to 54%) but allow changes to instance attributes.
Trap: Spot Instances are always cheaper than On-Demand. Reality: Spot prices can spike above On-Demand, especially for popular instance types. You may pay more than On-Demand if your bid is high.
Summary
Choosing the right pricing model depends on workload characteristics: steady-state workloads benefit from RIs or Savings Plans; dynamic or short-term workloads use On-Demand; fault-tolerant, flexible workloads use Spot. The SAA-C03 exam tests your ability to match pricing models to scenarios. Always consider the trade-off between cost savings and risk of interruption.
Identify workload characteristics
First, determine if the workload is steady-state or variable. Steady-state workloads run continuously (e.g., production web servers, databases). Variable workloads can be batch jobs, development/test, or unpredictable spikes. Also assess fault tolerance: can the workload handle interruptions? If yes, Spot is viable. If no, On-Demand or RI is needed. This step is crucial for the exam: you must match the scenario to the right model.
Evaluate commitment duration
If the workload is steady-state and you can commit to 1 or 3 years, consider Reserved Instances or Savings Plans. Calculate the discount: Standard RIs offer up to 72% off On-Demand. Convertible RIs offer up to 54% but allow flexibility. If you cannot commit, On-Demand or Spot are the options. For short-term predictable patterns (e.g., business hours), Scheduled RIs may fit.
Analyze cost vs. flexibility trade-off
On-Demand is most expensive but offers maximum flexibility. RIs are cheaper but require commitment. Spot is cheapest but can be interrupted. For the exam, if a question says 'cost-optimized and fault-tolerant', Spot is likely the answer. If 'steady-state and predictable', choose RIs. If 'unpredictable and cannot tolerate interruption', choose On-Demand.
Implement with Auto Scaling
Use EC2 Auto Scaling with mixed instances policy to combine On-Demand and Spot. For example, set a baseline of On-Demand instances to handle minimum load, and add Spot instances for burst capacity. This ensures availability while reducing cost. The exam may ask how to maintain a minimum number of instances: use On-Demand as the base, Spot for scaling.
Monitor and adjust
Continuously monitor Spot price trends. If prices rise, adjust bid prices or switch to On-Demand. Use AWS Cost Explorer and Trusted Advisor for recommendations. For RIs, track utilization and sell unused capacity on the Reserved Instance Marketplace. The exam may test that you can modify or exchange RIs (Convertible only) or that you can stop an RI instance and still pay.
Enterprise Scenario 1: E-Commerce Website
A large e-commerce company runs a production website with steady traffic. They use a mix of On-Demand and Reserved Instances. For the baseline web server fleet, they purchase 1-year Standard RIs for m5.large instances in us-east-1a, paying Partial Upfront. This reduces cost by 40% compared to On-Demand. For flash sales, they use Auto Scaling with Spot Instances to handle traffic spikes. They configure a mixed instances policy: 70% On-Demand (covered by RIs) and 30% Spot. Spot Instances are used for stateless web servers that can be terminated if the sale ends. During a flash sale, if Spot prices spike, the Auto Scaling group launches On-Demand instances to maintain capacity. This setup saves 50% overall compared to all On-Demand. Misconfiguration: if they set Spot bid too low, instances may not launch during high demand, causing capacity shortfall. Solution: use a diversified Spot Fleet across multiple instance types and AZs.
Enterprise Scenario 2: Big Data Processing
A media company runs nightly batch jobs to process video files. The workload is fault-tolerant (jobs can restart) and runs for 4-6 hours. They use Spot Instances exclusively, bidding at the On-Demand price to ensure capacity. They use Spot Blocks to prevent termination during the critical 4-hour window. They also use EC2 Auto Scaling to replace terminated instances. This reduces compute costs by 80% compared to On-Demand. Common issue: if a Spot Block expires, instances are terminated, so they must ensure jobs complete within the block duration. They monitor Spot price trends and adjust bid accordingly. For the exam, remember that Spot Blocks are limited to 1-6 hours and not available in all regions.
Enterprise Scenario 3: Development and Test Environment
A startup runs development and test instances during business hours (9 AM to 6 PM, weekdays). They use Scheduled Reserved Instances for a 1-year term, paying No Upfront. This gives them a discount of 30% compared to On-Demand for the scheduled hours. Outside those hours, instances are stopped to avoid charges. They also use On-Demand for ad-hoc testing. Misconfiguration: if they need to run tests outside the schedule, On-Demand instances are launched, increasing costs. They could use Savings Plans instead for more flexibility. The exam may ask: what is the most cost-effective option for a predictable 9-5 workload? Answer: Scheduled Reserved Instances.
SAA-C03 Objective 4.1: Cost Optimized
The exam tests your ability to choose the most cost-effective EC2 pricing model based on workload characteristics. Key objectives:
Determine appropriate pricing model given usage patterns: steady-state, variable, short-term, fault-tolerant.
Understand the trade-offs between On-Demand, Reserved, and Spot.
Know the discount ranges: RI up to 72%, Spot up to 90%.
Understand that RIs are a billing discount, not a physical reservation.
Know that Spot Instances can be interrupted with a 2-minute warning.
Recognize that Savings Plans are an alternative to RIs with more flexibility.
Common Wrong Answers and Traps
Choosing Spot for a critical database: Candidates often pick Spot because it's cheapest, but databases need persistent storage and cannot tolerate interruptions. The correct answer is On-Demand or RI.
Choosing On-Demand for a predictable steady-state workload: On-Demand is more expensive; RIs or Savings Plans are better.
Thinking RIs are tied to a specific instance: RIs apply to any matching instance in the account; you can stop and start instances without affecting the RI discount.
Assuming Spot is always cheaper: Spot prices can exceed On-Demand; you need to set a max bid.
Confusing Convertible and Standard RIs: Standard RIs offer higher discounts but cannot be changed; Convertible RIs offer lower discounts but allow modification.
Specific Numbers and Terms on the Exam
Discounts: RI up to 72%, Spot up to 90%.
Term lengths: 1 year or 3 years.
Payment options: All Upfront, Partial Upfront, No Upfront.
Spot termination warning: 2 minutes.
Spot Block duration: 1 to 6 hours.
Scheduled RI: 1-year term, recurring daily/weekly.
Savings Plans: 1 or 3 years, flexible across instance families.
Edge Cases and Exceptions
Spot Instances in Auto Scaling: If you use a mixed instances policy, you can specify a percentage split. The exam may ask: how to ensure a minimum number of On-Demand instances? Set the On-Demand Base Capacity.
RI modifications: You can modify Standard RIs to change AZ, scope, or network platform (EC2-Classic to VPC) but not instance family. Convertible RIs can change instance family, OS, tenancy, and payment option.
RI Marketplace: You can sell unused RIs, but only Standard RIs with a remaining term less than 12 months.
Capacity Reservations: You can reserve capacity for On-Demand instances without commitment, but you pay for the reservation even if you don't use it.
How to Eliminate Wrong Answers
If the workload is fault-tolerant and flexible, eliminate On-Demand and RI (too expensive).
If the workload is steady-state and predictable, eliminate Spot (unreliable) and On-Demand (costly).
If the workload is short-term and cannot be interrupted, eliminate Spot.
If the question mentions 'cost-optimized' and 'fault-tolerant', Spot is likely correct.
If the question mentions 'steady-state' and 'predictable', RI is likely correct.
On-Demand: no commitment, highest cost, per-second billing for Linux (60-second min).
Reserved Instances: 1 or 3 year term, up to 72% discount, billing discount applied to matching instances.
Spot Instances: up to 90% discount, can be terminated with 2-minute warning, best for fault-tolerant workloads.
Standard RIs: higher discount, cannot change instance family; Convertible RIs: lower discount, can change attributes.
Savings Plans: flexible, apply to EC2, Lambda, Fargate; 1 or 3 year term.
Scheduled RIs: for recurring schedules (e.g., 9-5 weekdays), 1-year term.
Spot Blocks: prevent termination for 1-6 hours (limited regions).
Use mixed instances policy in Auto Scaling to combine On-Demand and Spot for cost optimization.
These come up on the exam all the time. Here's how to tell them apart.
On-Demand
No upfront commitment.
Highest per-hour cost.
Billed per second (Linux) or per hour (Windows).
No capacity reservation.
Best for short-term, unpredictable workloads.
Reserved Instances
Requires 1- or 3-year commitment.
Up to 72% discount.
Billed monthly regardless of usage.
Optional capacity reservation (AZ-specific).
Best for steady-state, predictable workloads.
Standard RI
Up to 72% discount.
Cannot change instance family.
Can change AZ, scope, network platform.
Can be sold on Marketplace.
Higher discount than Convertible.
Convertible RI
Up to 54% discount.
Can change instance family, OS, tenancy, payment option.
Can change AZ, scope, network platform.
Cannot be sold on Marketplace.
Lower discount than Standard.
Spot Instances
Up to 90% discount.
Can be terminated with 2-minute warning.
Best for fault-tolerant workloads.
No commitment.
Price fluctuates based on supply/demand.
On-Demand
No discount.
Cannot be terminated by AWS (unless you stop/terminate).
Best for non-fault-tolerant workloads.
No commitment.
Fixed price per hour.
Mistake
Reserved Instances reserve capacity in an Availability Zone.
Correct
Standard RIs provide a capacity reservation only if you specify an Availability Zone. If you purchase a Regional RI (no AZ specified), you get a billing discount but no capacity reservation.
Mistake
Spot Instances can run indefinitely if the Spot price stays low.
Correct
Spot Instances can be terminated by AWS at any time, even if your bid is above the Spot price, due to capacity needs. The 2-minute warning is a best-effort guarantee.
Mistake
You can convert a Standard RI to a Convertible RI.
Correct
Standard RIs cannot be converted to Convertible RIs. You can only modify certain attributes of Standard RIs (AZ, scope, network platform). To change instance family, you need a Convertible RI.
Mistake
On-Demand instances are billed per hour for all operating systems.
Correct
Linux instances launched after 2017 are billed per second (60-second minimum). Windows and other OS are billed per hour.
Mistake
Savings Plans are the same as Reserved Instances.
Correct
Savings Plans offer more flexibility: they apply to any EC2 instance, Lambda, and Fargate usage, regardless of instance family, size, or region (for Compute Savings Plans). RIs are specific to an instance family and region.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
No. Reserved Instances are a billing commitment. You pay for the entire term regardless of whether the instance is running or stopped. However, if you stop the instance, the RI discount still applies to any matching running instance. If no matching instance runs, you still pay the RI hourly charge (the discounted rate). To avoid paying, you can sell the RI on the Marketplace.
You receive a 2-minute warning before termination. You can use this time to save state (e.g., checkpoint data to S3). AWS does not charge for partial hours when it terminates the instance (if it runs less than an hour). However, if you terminate the instance yourself, you are charged for the full hour.
For Standard RIs, you cannot change the instance family (e.g., from m5 to c5). You can modify the Availability Zone, scope (regional to AZ), and network platform (EC2-Classic to VPC). For Convertible RIs, you can exchange for another Convertible RI with different instance family, size, OS, tenancy, or payment option.
A Regional RI applies a discount to any matching instance in any Availability Zone in the region. It does not reserve capacity. An AZ-specific RI reserves capacity in that AZ and applies a discount to instances in that AZ. Regional RIs are more flexible; AZ-specific RIs guarantee capacity.
Savings Plans are more flexible: Compute Savings Plans apply to any EC2 instance, regardless of family, size, region, OS, or tenancy, as well as Lambda and Fargate. EC2 Instance Savings Plans are similar to RIs (specific instance family in a region). Discounts are similar to RIs (up to 72%). Savings Plans are billed based on committed $/hour, not instance count.
It is not recommended because Spot Instances can be terminated at any time. If you must use Spot, you should store state externally (e.g., in S3, DynamoDB, or EFS). You can also use Spot Blocks to guarantee uptime for 1-6 hours, but this is not available in all regions.
If you do not specify a maximum bid, it defaults to the On-Demand price. This ensures your instance runs as long as the Spot price is at or below On-Demand. However, you can set a lower bid to reduce cost, but you risk termination if the Spot price rises.
You've just covered EC2 Pricing: On-Demand, Reserved, Spot — now see how well it sticks with free SAA-C03 practice questions. Full explanations included, no account needed.
Done with this chapter?