Sub topic 2
Trading commitment for a lower price
This chapter assumes you know what an EC2 instance, an instance family, a Region, and an Availability Zone are. It also assumes you have seen On-Demand pricing on a bill and have run AWS CLI commands. It covers the idea behind every commitment-based discount: you promise AWS a certain amount of usage, and AWS charges you less for it. The following chapters cover Reserved Instances and Savings Plans in detail.
Why AWS discounts a commitment
On-Demand pricing is the baseline. You pay a fixed rate per instance-second, you can stop at any time, and you promise nothing. That flexibility costs money. AWS must keep spare capacity available for anyone who might launch an instance at any moment, and it cannot predict how long you will stay.
A commitment removes some of that uncertainty. If you agree to pay for a defined amount of usage for one or three years, AWS can plan its capacity and revenue. It passes part of that benefit to you as a lower rate.
Commitment discounts have these properties:
- You pay whether or not you use the commitment. The charge is fixed for the term.
- The discount is a billing construct. In most cases you do not launch a special kind of instance. AWS applies the lower rate to matching usage on your bill.
- The discount depends on how much you commit to. Longer terms and larger upfront payments give lower rates.
- Higher discounts require less flexibility. A commitment tied to one instance family in one Region is cheaper than one that applies to any compute usage.
The two commitment products
AWS offers two commitment-based products for EC2:
| Product | What you commit to | Typical flexibility |
|---|---|---|
| Reserved Instances (RIs) | A specific instance configuration, for example an instance type or family in a Region or Availability Zone | Depends on whether the RI is Standard or Convertible, and on its scope |
| Savings Plans | A dollar amount of usage per hour, for example $2.00 per hour | Depends on the plan type. Compute Savings Plans are the most flexible |
Both use 1-year or 3-year terms. Both let you choose how to pay. AWS publishes maximum discounts of up to about 72 percent compared with On-Demand for each product. The actual figure depends on instance family, Region, operating system, term, and payment option, so check current pricing for your own case.
Spot Instances are a different trade. You do not commit to a term. You accept that AWS can take the capacity back. That is covered in its own chapter.
Term and payment option
Two choices appear in nearly every commitment purchase.
Term is 1 year or 3 years. A 3-year term gives a lower rate, but you are exposed to changes in your workload, new instance generations, and price cuts for longer.
Payment option has three values:
- All Upfront. You pay the whole term at purchase. This gives the lowest effective rate.
- Partial Upfront. You pay part at purchase and the rest as a reduced hourly charge.
- No Upfront. You pay nothing at purchase and a discounted hourly charge for the term. The discount is the smallest of the three.
The payment option changes your cash flow and your effective rate. It does not change the commitment itself. With No Upfront, you still owe the hourly charge for every hour of the term, even if you stop using the capacity.
The break-even calculation
A commitment pays off only if you use it enough. The break-even utilization is the fraction of hours you must use the commitment before it costs less than On-Demand.
break-even utilization = commitment rate / On-Demand rateSuppose an instance costs $0.10 per hour On-Demand, and a commitment gives an effective rate of $0.065 per hour, which is a 35 percent discount. The break-even utilization is 0.065 / 0.10 = 65 percent. If the instance runs more than 65 percent of the hours in the term, the commitment saves money. If it runs less, On-Demand would have cost less.
The script below computes this for one month of 730 hours.
ON_DEMAND_RATE = 0.10 # dollars per instance-hour
COMMIT_RATE = 0.065 # effective dollars per hour, paid for every hour
HOURS_PER_MONTH = 730
break_even = COMMIT_RATE / ON_DEMAND_RATE
print(f"Break-even utilization: {break_even:.0%}")
commit_cost = COMMIT_RATE * HOURS_PER_MONTH
for utilization in (1.0, 0.8, 0.65, 0.5):
hours_used = HOURS_PER_MONTH * utilization
on_demand_cost = ON_DEMAND_RATE * hours_used
difference = on_demand_cost - commit_cost
print(
f"Used {utilization:>4.0%} of hours: "
f"On-Demand ${on_demand_cost:6.2f}, "
f"commitment ${commit_cost:6.2f}, "
f"commitment saves ${difference:7.2f}"
)The output shows the commitment saving $25.55 at full use, breaking even at 65 percent, and losing $10.95 at 50 percent. The cost of the commitment is constant, and the cost of On-Demand falls as usage falls.
What "committing" means in each product
The commitment is expressed differently in the two products, and that changes how you reason about risk.
Reserved Instances commit you to a configuration. You buy, for example, a number of RIs for a given instance type and Region. Each hour, AWS checks whether you ran matching instances and applies the RI rate to them. If you ran fewer matching instances than you reserved, the unused RIs are still billed.
Savings Plans commit you to a spend rate. You choose a dollar amount per hour. Each hour, AWS applies the discounted Savings Plans rates to eligible usage, starting with the usage that gives the largest discount, until the hourly commitment is used up. Eligible usage beyond that is billed at On-Demand rates. If eligible usage is too small to use the whole commitment, you still pay the full commitment for that hour.
In both cases a shortfall costs money and an excess is billed On-Demand. The difference is the unit: a count of matching instances for RIs, and dollars for Savings Plans.
The risks you accept
A commitment moves risk from AWS to you. The main risks are:
- Overcommitment. Your usage drops below the commitment, so you pay for unused capacity. This happens after a migration, a shutdown, or an optimization that cuts instance counts.
- Technology drift. You commit to an instance family, and later move to a newer generation or a different family. A commitment tied to the old family stops matching your usage.
- Region or architecture change. You move workloads to another Region, or to a different CPU architecture. A narrowly scoped commitment may not follow.
- Lock-in on price. AWS may lower On-Demand prices during your term. Your committed rate stays fixed.
- Cash tied up. Upfront payments reduce cash on hand and have an opportunity cost.
You manage these risks by committing to less than your usage. A common rule is to commit only to your lowest steady level of usage, the floor that has stayed constant for months, and leave the variable part on On-Demand or Spot.
Getting a data-driven starting point
Before you buy, look at your own history. Cost Explorer can generate a Savings Plans purchase recommendation based on past usage. The command below asks for a Compute Savings Plan recommendation using the last 30 days, for a 1-year term with no upfront payment.
aws ce get-savings-plans-purchase-recommendation \
--savings-plans-type COMPUTE_SP \
--term-in-years ONE_YEAR \
--payment-option NO_UPFRONT \
--lookback-period-in-days THIRTY_DAYSThe response includes a recommended hourly commitment and an estimate of savings. Treat it as an input, not an instruction. A 30-day lookback can miss a seasonal peak or trough. It also assumes your future usage will look like your past usage. A later chapter covers how to read these numbers along with coverage and utilization.
A decision sketch
Use these questions, in order, before committing:
- How steady is the usage? If it runs close to 24 hours a day and has done so for months, it is a candidate. If it is spiky or new, wait for data.
- How long will it run? If you cannot say whether it will exist in a year, a 3-year term is hard to justify.
- How much flexibility do you need? If you may change instance families, Regions, or services, prefer the more flexible product, and accept a smaller discount.
- How much cash can you tie up? Use the payment option to balance the rate against cash flow.
- Is the workload interruptible? If it can tolerate interruption, Spot may beat any commitment for that portion.
Common mistakes
- Committing to peak usage instead of the floor. The peak lasts a few hours a day. The commitment is billed all day.
- Treating the maximum discount as the expected discount. The "up to 72 percent" figure applies to the best combination of options. Your own savings are usually lower.
- Ignoring the payment option when comparing offers. An All Upfront rate and a No Upfront rate are not directly comparable without accounting for the cash paid at the start.
- Buying once and never reviewing. Usage changes. Review coverage and utilization regularly, and buy in several smaller steps rather than one large purchase.
Exercise
An instance costs $0.20 per hour On-Demand. A 1-year commitment gives an effective rate of $0.13 per hour, billed for every hour of the term whether or not the instance runs. (1) What is the break-even utilization? (2) You expect the instance to run only 60 percent of the hours. Should you commit? (3) Which part of your workload should you commit to, and why?
Show answer
(1) Break-even utilization is 0.13 / 0.20 = 65 percent. (2) No. At 60 percent utilization you would pay On-Demand for 0.60 x $0.20 = $0.12 per hour of the term on average, and the commitment costs $0.13 per hour, so the commitment is more expensive. (3) Commit only to the steady floor of usage, the amount that runs nearly all the time. That portion will exceed the break-even utilization. Leave the variable portion on On-Demand or Spot, so you do not pay for committed capacity you do not use.