← Cloud Practitioner study path

Billing, pricing and support · 14 min

Amazon EC2 purchasing options and how to choose one

In this lesson you will learn what each of the seven Amazon EC2 purchasing options is for, how much of a discount each one gives and which clues in the question tell you which one to choose on the exam.

Amazon EC2 is the AWS service for renting computers, and each computer you rent is called an . An EC2 purchasing option is the way you pay for that instance, and the same instance can have very different prices depending on the option you choose. Each option gives AWS something different in exchange for the price: nothing, the freedom to interrupt it, a one-year or three-year commitment or the exclusive use of a . For example, an online store can pay less per hour if it promises to use the same instance for three years, because AWS then knows it will be paid for those three years.

The seven Amazon EC2 purchasing options, grouped into no commitment, 1-year or 3-year commitment, guaranteed capacity and dedicated hardware

AWS has seven purchasing options, and the exam asks you to recognize which one is the right fit in each case. The seven are grouped by what AWS asks of you in exchange: On-Demand and Spot ask for no commitment, Savings Plans and Reserved Instances ask for a one-year or three-year commitment, Capacity Reservations guarantees you capacity (instances available when you ask for them), and Dedicated Hosts and Dedicated Instances give you dedicated hardware, meaning physical machines you don't share with other customers.

On-Demand and Spot

On-Demand is the list price of EC2. With this option you pay per second (with a minimum of 60 seconds) for the instances you launch, with no upfront payment and no term. It is the most flexible option and also the one that costs the most per hour, so it works for new, short or unpredictable . For example, the store uses On-Demand to test for one week a new page it doesn't know it will keep.

Spot, on the other hand, uses EC2 capacity that nobody is using, which is why it can cost up to 90% less than On-Demand. In exchange, AWS can reclaim the instance when it needs that capacity, and it gives you a two-minute warning. This option works when you are flexible about when your application runs and when the application can be interrupted without harm, such as data analysis, and background work. For example, the store calculates a sales report every night with Spot: if AWS takes the instance away, the report starts over and comes out a little later, without any customer noticing.

True or false?

0 of 4
  1. AWS can reclaim a Spot Instance with a two-minute warning.

  2. Spot is a good option for a production database that can't be interrupted.

  3. On-Demand is the most flexible option and the one that costs the most per hour.

  4. A Spot Instance can cost up to 90% less than On-Demand.

Savings Plans and Reserved Instances

Savings Plans and Reserved Instances give up to 72% off On-Demand in exchange for a one-year or three-year commitment. The difference is in the commitment: with a Savings Plan you commit to an amount of spend, and with a Reserved Instance you commit to an instance configuration. AWS recommends Savings Plans over Reserved Instances, because they reach the same maximum discount with more flexibility, but both options are assessed on the exam. For example, the store can promise an amount of spend per hour (Savings Plan) or promise that it will use a certain instance in a certain Region (Reserved Instance), and in both cases it pays less than with On-Demand.

Savings Plans

The four types of Savings Plans with their maximum discount: Compute up to 66%, EC2 Instance up to 72%, Database up to 35% and SageMaker AI up to 64%

With a Savings Plan you commit to spending a fixed amount of dollars per hour. Whatever you use above that amount is charged at the On-Demand price, and if you use less, you still pay the commitment. For example, if one night the store uses less than it promised, it pays the full amount, and if it uses more during a special sale, the extra is charged at the On-Demand price.

There are four types of Savings Plans:

  • Compute Savings Plans, which give up to 66% off and apply to any EC2 , size, Region or , and also to AWS Fargate and AWS Lambda, two services that run programs without you managing the instances.
  • EC2 Instance Savings Plans, which give up to 72% off and tie you to one instance family in one Region, for example m5 in Virginia.
  • Database Savings Plans, which give up to 35% off databases, the services that store organized information, such as the store's orders.
  • SageMaker AI Savings Plans, which give up to 64% off SageMaker AI, the AWS service for building artificial intelligence models.

Which commitment do you choose?

Your company uses EC2 instances from several families in two Regions and also AWS Lambda functions. It wants a single three-year commitment that covers everything. What does it buy?

Reserved Instances

With a Reserved Instance you commit to a configuration, which includes the instance type, the Region, the operating system and the tenancy (whether or not you share hardware with other customers). With that purchase, your bill applies the discount to the instances that match what you bought, so AWS doesn't set aside a server for you. For example, if the store buys a Reserved Instance for an m5 instance with Linux in Virginia, every hour that an instance like that runs is charged at a discount.

A Reserved Instance can't be canceled and doesn't renew on its own, so when it expires the instance keeps running and is charged at the On-Demand price. For example, if the store's reservation expires and nobody buys another one, the same instance starts being charged at the list price. Reserved Instances come in two classes:

  • Standard, which gives a bigger discount and which you can sell in the Reserved Instance Marketplace, a store where other customers buy the reservations you no longer need.
  • Convertible, which gives a smaller discount and which you can exchange for another configuration. For example, a store that needs a bigger instance can exchange its Convertible reservation for one of that size.

In addition, a Reserved Instance can be zonal or regional. A zonal one reserves capacity in an , while a regional one doesn't reserve capacity. For example, with a zonal reservation the store is guaranteed that its instance will be able to start in that zone, and with a regional one it only gets the discount.

Payment options

Savings Plans and Reserved Instances are paid in three ways:

  • All Upfront, where you pay everything at the start and get the biggest discount.
  • Partial Upfront, where you pay part at the start and the rest little by little over the term.
  • No Upfront, where you pay nothing at the start.

For example, a store that has the money saved can pay All Upfront to save more, and one that prefers not to spend it all at once chooses No Upfront.

Capacity Reservations

Capacity Reservations sets aside EC2 capacity in an Availability Zone, so that instances are available when you need them, for example during an event. This option doesn't ask for a one-year or three-year commitment, but it doesn't give a discount either: you pay for the reservation at the On-Demand price whether you use it or not. For example, if the store reserves 20 instances for a sale day and runs 15, it pays for 20.

To have guaranteed capacity and a discount at the same time, Capacity Reservations is combined with a Savings Plan or with a regional Reserved Instance. For example, the store sets aside its instances with Capacity Reservations and its Savings Plan lowers the price of those same instances.

Dedicated Hosts and Dedicated Instances

Dedicated Hosts and Dedicated Instances run your instances on hardware that no other customer uses, and they differ in what they give you and how they are charged:

  • Dedicated Hosts, which gives you a complete physical server, is charged per server and lets you see its and . That is why it works for using licenses you already have that are charged per socket, core or virtual machine (another way of saying instance). For example, a bank that already paid for a program licensed for a certain number of cores needs to know how many cores the server it will install it on has.
  • Dedicated Instances, which is charged per instance and is enough when all you need, for , is not to share hardware with other customers. For example, a hospital whose rules forbid it from sharing machines with other companies can use Dedicated Instances.

Which purchasing option do you use?

0 of 5

Tap the correct column for each case.

  1. Batch processes that can be interrupted, at the lowest cost

  2. A short, unpredictable workload that can't be interrupted

  3. Guaranteeing instances in a zone for an event, without a one-year or three-year commitment

  4. Using licenses you already have that are charged per socket or core

  5. Data analysis that can wait if AWS reclaims the instance

How do you choose a purchasing option?

To choose a purchasing option, the exam expects you to ask yourself two questions about the workload: whether it can tolerate interruptions and whether it will run steadily for one or three years.

Decision tree for choosing an Amazon EC2 purchasing option

If the workload can tolerate interruptions, Spot is the right fit. If it can't and it won't run steadily for one or three years, On-Demand is the right fit, and if it will run steadily, a Savings Plan or a Reserved Instance is the right fit, depending on how much flexibility you need: Compute Savings Plans when the workload may change family, Region or service, and EC2 Instance Savings Plans or a Reserved Instance when it won't. For example, the store's home page runs all day and can't go down, so a commitment is the right fit for it, while its nightly report can wait and Spot is the right fit for it.

Guaranteeing capacity and using dedicated hardware are separate cases, because in them the goal is not to save money. To guarantee instances in a zone there is Capacity Reservations, and to use licenses that are charged per socket or core there is Dedicated Hosts. For example, if the store needs guaranteed instances for its sale day, the answer is Capacity Reservations even though it costs more.

Choose how to buy the instance

Choose how much of the month the workload runs and whether it can be interrupted. The options go from the highest price per hour to the lowest; the one that fits is highlighted.

How much of the month does it run?
Can it be interrupted?
One monthYou pay for the commitment, used or notCosts more per hourCosts less per hourOn-DemandNothing:no termSavings Plansor ReservedA 1 or 3 yearcommitmentSpotAWS canreclaim it

Use Savings Plans or Reserved Instances.

It runs all month and can't be interrupted. If it will keep running like that for one or three years, a commitment lowers the price per hour. AWS recommends Savings Plans over Reserved Instances because they give the same maximum discount with more flexibility.

This is a guide for the exam, without prices: Capacity Reservations and dedicated hardware are not savings options.

If your account uses the new experience

The new experience is the way to open an AWS account with Google, GitHub, Apple, Amazon or email, and in it you can only use On-Demand. Those accounts don't have Savings Plans or Reserved Instances, and the policies (rules AWS applies to your projects) deny Spot, Capacity Reservations and Dedicated Hosts, on both the free plan and the paid plan. To try the other options you need a full account. For example, if you try to launch a Spot Instance from a new experience account, AWS doesn't let you.

On the exam

Questions on this topic describe a workload and ask you for the purchasing option that is the right fit. To choose, look in the question for these clues, each of which points to an option:

  • "Can be interrupted" or "batch processing" together with "lowest cost", which point to Spot.
  • "Steady workload" or "constant usage for 1 or 3 years", which point to Savings Plans or Reserved Instances.
  • "EC2 and Lambda with a single commitment" or "may change family or Region", which point to Compute Savings Plans.
  • "Existing per-socket or per-core licenses", which point to Dedicated Hosts.
  • "Guarantee capacity in a zone" with no term commitment, which points to Capacity Reservations.
  • "Short", "unpredictable" and "can't be interrupted", which point to On-Demand.

For example, if a question says that a school runs a batch process every weekend that can be interrupted and wants the lowest cost, the answer is Spot.

Review question

A company runs a web application on Amazon EC2 all day, every day, and expects to keep doing so for three years. Next year it plans to move part of the application to AWS Lambda, and it wants a single commitment that keeps giving it a discount after the change. What does it buy?

Next