Sub topic 6
Comparing On-Demand, Savings Plans, and Reserved Instances
This chapter assumes you can configure an EC2 service line in the calculator and that you have already turned workload usage into hours and instance counts. Here you compare the three main ways to pay for the same compute and see how each choice changes the estimate.
The three purchase options
The usage you estimate stays the same. The option you pick changes the rate applied to it.
- On-Demand charges a fixed hourly rate with no commitment. You pay only for hours that run. It costs the most per hour and is the most flexible.
- Savings Plans are a commitment to spend a set dollar amount per hour for 1 or 3 years. In return you get a lower rate. Compute Savings Plans apply across instance families, Regions, and some other compute services. EC2 Instance Savings Plans are tied to one instance family in one Region and discount more.
- Reserved Instances (RIs) are a commitment to a specific instance configuration for 1 or 3 years. Standard RIs discount the most. Convertible RIs let you change the configuration and discount less.
Both commitment types offer payment choices: All Upfront, Partial Upfront, and No Upfront. The more you pay upfront, the lower the effective hourly rate.
How the choice appears in the calculator
When you configure an EC2 line, you pick a pricing strategy in the configuration form. Choosing a Savings Plan or Reserved Instance reveals more inputs: term length, payment option, and, for RIs, the offering class (Standard or Convertible). The line item then shows the discounted rate. Upfront amounts appear separately from the recurring monthly cost, so read both figures.
A practical method is to add the same configuration twice, once as On-Demand and once with a commitment. Place them side by side, for example in separate groups, and compare the totals.
Checking the arithmetic
A commitment only saves money if the instances run enough of the time. The function below compares a monthly On-Demand cost with a commitment cost that is charged for every hour whether or not the instance runs. The rates are illustrative placeholders, not current AWS prices.
HOURS_PER_MONTH = 730
def on_demand_monthly(rate, count, utilization=1.0):
return rate * HOURS_PER_MONTH * utilization * count
def committed_monthly(effective_rate, count):
# A commitment is billed for every hour, used or not.
return effective_rate * HOURS_PER_MONTH * count
on_demand_rate = 0.020 # illustrative
committed_rate = 0.013 # illustrative effective hourly rate
count = 3
for utilization in (1.0, 0.75, 0.5, 0.25):
od = on_demand_monthly(on_demand_rate, count, utilization)
cm = committed_monthly(committed_rate, count)
cheaper = "commitment" if cm < od else "on-demand"
print(f"{utilization:>4.0%} on-demand={od:7.2f} committed={cm:7.2f} -> {cheaper}")
break_even = committed_rate / on_demand_rate
print(f"Break-even utilization: {break_even:.0%}")With these placeholder rates, the break-even point is 65%. If the instances run less than about 65% of the month, On-Demand is cheaper. This is why steady, always-on workloads suit commitments and spiky or short-lived ones usually do not.
Choosing between options
Use these criteria:
| Criterion | On-Demand | Savings Plans | Reserved Instances |
|---|---|---|---|
| Commitment | None | Dollars per hour | Specific configuration |
| Flexibility | Highest | High (Compute) to moderate (EC2 Instance) | Lower |
| Best for | Spiky, new, or short-lived workloads | Steady spend that may change shape | Steady, well-known configurations |
Common mistakes
- Committing for the whole fleet. Commit only to the baseline that always runs. Keep the variable part On-Demand.
- Ignoring upfront payments. An All Upfront line can show a low monthly figure while a large one-time amount sits elsewhere in the estimate.
- Comparing different configurations. Keep Region, operating system, tenancy, and size identical across the lines you compare.
- Treating the saving as certain. The estimate assumes your usage forecast is right. A commitment is a cost even when usage drops.
Exercise
Three instances have an On-Demand rate of $0.020 per hour. A commitment has an effective rate of $0.013 per hour and is billed for all 730 hours of the month. At what utilization does the commitment become cheaper, and what does that tell you about a workload that runs 12 hours a day?
Show answer
Break-even utilization is 0.013 / 0.020 = 65%. A workload running 12 hours a day is about 50% utilized, which is below the break-even. On-Demand is cheaper for it, so a commitment would cost more than it saves.
Exercise
You are estimating a web tier. A baseline of 4 instances runs all month, and traffic spikes add up to 6 more for a few hours each week. How would you model the purchase options?
Show answer
Model the 4 baseline instances with a Savings Plan or Reserved Instance, since they run continuously. Model the spike instances as On-Demand with a low utilization value, because a commitment on them would be billed even when they are not running.