Lesson 1 of 3 AWS Pricing Models

Choosing an EC2 Purchasing Option

This lesson explains the ways to pay for Amazon EC2 instances. Choosing the right one for each workload can save most of the cost, and this is one of the most tested pricing subjects.

Learning outcomes

After completing this lesson, you will be able to:

  • Distinguish On-Demand Instances, Savings Plans, Reserved Instances and Spot Instances.
  • Choose a purchasing option from a workload's usage pattern.
  • Explain how consolidated billing shares discounts across accounts.

Purchasing options

EC2 can be bought in several ways, each trading commitment or flexibility for price. On-Demand Instances are paid per second or hour with no commitment, which suits short-term, spiky or unpredictable workloads and testing. For steady usage, a one- or three-year commitment earns a large discount: Savings Plans commit to spending a dollar amount per hour, and Compute Savings Plans apply to any EC2 instance family, Region or operating system and to Fargate and Lambda; Reserved Instances commit to a specific instance configuration.

Spot Instances use spare AWS capacity at up to 90% off, but AWS can take them back with two minutes' warning, so they suit work that can be interrupted and restarted, such as batch processing and testing. Dedicated Hosts give you a whole physical server, which is needed for software licences tied to physical cores. Dedicated Instances run on hardware used only by your account. On-Demand Capacity Reservations guarantee capacity in an Availability Zone without a long-term commitment. The following table summarises the options.

OptionHow it worksDiscountBest for
On-DemandPay per second or hour, no commitmentNoneShort-term, spiky or unpredictable workloads that cannot be interrupted; testing
Savings PlansCommit to a $/hour amount for 1 or 3 yearsUp to about 72%Steady usage; Compute Savings Plans cover any EC2 family, Region or OS, plus Fargate and Lambda
Reserved InstancesCommit to a specific instance configuration for 1 or 3 years; Standard (biggest discount) or Convertible (exchangeable); All, Partial or No UpfrontUp to about 72%Steady-state workloads
Spot InstancesSpare capacity that AWS can reclaim with two minutes' warningUp to 90%Fault-tolerant, flexible work: batch, analysis, rendering, CI/CD
Dedicated HostsA physical server of your own, with visibility of sockets and cores—BYOL software tied to cores; compliance
Dedicated InstancesHardware dedicated to your account, without host visibility—Single-tenancy requirements
On-Demand Capacity ReservationsReserve capacity in an AZ with no term commitmentNoneGuaranteed capacity

The following diagram compares the maximum discount of each option.

EC2 purchasing options by maximum discount. On-Demand has no commitment and no discount, for short-term or unpredictable work. Savings Plans and Reserved Instances give up to about 72% off for a one- or three-year commitment, for steady usage. Spot Instances give up to 90% off spare capacity that AWS can reclaim with two minutes' warning, for work that can be interrupted. Dedicated Hosts and Capacity Reservations serve licensing and capacity needs.
Discounts are maximums; actual savings depend on the commitment.
Scenario questions

Choosing a purchasing option

Exam skills 4.1.1 · 4.1.2

Choose the EC2 purchasing option for each workload.

Log in to try this activity Interactive activities are free with an account.

Sharing discounts

In AWS Organizations, Reserved Instance and Savings Plans discounts are shared across accounts through consolidated billing.

Fill in the value

Discount figures

Exam skills 4.1.1

Recall the key figures for EC2 purchasing options.

Log in to try this activity Interactive activities are free with an account.
Worked example

The right option for each workload

A company runs four kinds of workload on EC2 and chooses a purchasing option for each:

WorkloadPatternBest option
Company websiteRuns all day, every day, for yearsSavings Plan (1 or 3 years)
Nightly video renderingCan be paused and resumed; timing is flexibleSpot Instances (up to 90% off)
A two-week marketing campaign siteShort, unpredictable, must not be interruptedOn-Demand
Database software licensed per physical CPU coreLicence tied to hardwareDedicated Host

Choosing On-Demand for the website would work but cost far more over a year than a Savings Plan. Choosing Spot for the campaign site would be cheap but risky, because AWS can reclaim Spot Instances with two minutes' warning.

Check yourself

Which EC2 purchasing option gives the largest discount but can be interrupted?

Show answer

Spot Instances, which use spare capacity and suit work that can be interrupted.

Exam Tips

Remember for the exam

  • Unpredictable, short-term workloads that cannot be interrupted suit On-Demand Instances.
  • Steady usage over one to three years suits Savings Plans or Reserved Instances.
  • A flexible discount across EC2, Fargate and Lambda comes from Compute Savings Plans.
  • The cheapest option, for fault-tolerant and flexible workloads, is Spot Instances.
  • BYOL software tied to physical cores or sockets requires Dedicated Hosts.
  • To guarantee capacity in an Availability Zone without a long commitment, use Capacity Reservations.