CLF-C02 · SAA-C03
EC2 pricing models: On-Demand, Reserved, Savings Plans and Spot
How Amazon EC2 On-Demand, Reserved Instances, Savings Plans, Spot Instances and Dedicated Hosts differ, and which one fits common exam scenarios.
Why there are several ways to pay
Amazon EC2 offers the same instances under different purchase options. The instance runs the same way either way; what changes is how you commit and what you pay. In general, the more you commit or the more interruption you accept, the less you pay.
Most exam questions give a workload description and ask for the most cost-effective option. The key facts are how long it runs, whether it can be interrupted, and whether usage is steady.
On-Demand Instances
On-Demand means you pay by the second or hour for what you run, with no commitment. You can start and stop at any time.
It fits short-term, spiky or unpredictable workloads that cannot be interrupted, and anything new where you do not know the usage yet. A two-week proof of concept or a test environment that runs during a sprint are good examples. On-Demand is the most flexible option and the most expensive per hour.
Savings Plans
With a Savings Plan you commit to a fixed amount of compute spend per hour for a one-year or three-year term. In exchange, usage up to that amount is billed at lower rates. Anything above the commitment is billed at On-Demand rates.
There are two main types for EC2. Compute Savings Plans apply to any instance family, size, Region and operating system, and also cover AWS Fargate and AWS Lambda. EC2 Instance Savings Plans give a larger discount but are tied to one instance family in one Region.
AWS recommends Savings Plans for most steady workloads because they are simpler and more flexible than Reserved Instances.
Reserved Instances
Reserved Instances (RIs) are a billing discount for committing to a specific instance configuration for one or three years. You can pay all upfront, partial upfront or no upfront; more upfront means a bigger discount.
- Standard RIs give the larger discount but you cannot change the instance family.
- Convertible RIs let you exchange for a different family, OS or tenancy, with a smaller discount.
- Zonal RIs, scoped to one Availability Zone, also reserve capacity in that zone. Regional RIs do not reserve capacity.
Spot Instances
Spot Instances use spare EC2 capacity at a steep discount. The catch is that AWS can reclaim them when it needs the capacity, with a two-minute warning.
Spot fits fault-tolerant, flexible work: batch processing, image rendering, CI builds, big data jobs and stateless web servers in an Auto Scaling group with other capacity. It does not fit a database primary or anything that must finish without interruption. If a question says "can tolerate interruption" or "can be restarted", Spot is usually the answer.
Dedicated options and capacity reservations
A few options exist for licensing, compliance or capacity needs rather than cost:
- Dedicated Hosts: a whole physical server for your use, with visibility into sockets and cores. Used for bring-your-own-license software that is licensed per socket or core.
- Dedicated Instances: instances on hardware not shared with other AWS accounts, without host-level control.
- On-Demand Capacity Reservations: reserve capacity in a specific Availability Zone for any duration, billed whether or not you use it. Can be combined with Savings Plans for the discount.
Picking the right option
A common real setup mixes several options. A company might cover its always-on baseline with a Compute Savings Plan, handle daytime peaks with On-Demand, and run nightly analytics on Spot.
For the exam, map the scenario: steady usage for a year or more points to Savings Plans or Reserved Instances. Unknown or short-term usage that must not stop points to On-Demand. Interruptible work points to Spot. Per-core software licenses or a rule that hardware cannot be shared points to Dedicated Hosts.
Practice questions
A developer needs to test a new application for two weeks. The workload must not be interrupted and the team cannot predict its usage. Which EC2 pricing option is most appropriate?
- Dedicated Hosts
- On-Demand Instances
- Spot Instances
- Standard Reserved Instances
Answer
B. On-Demand Instances have no long-term commitment and are not interrupted by AWS, which fits short-term, unpredictable work. Spot Instances can be reclaimed, and Reserved Instances require a long-term commitment.
CLF-C02 question 83
Which statement describes how Amazon EC2 Dedicated Hosts differ from Dedicated Instances?
- Dedicated Hosts give visibility and control over a specific physical server
- Dedicated Hosts share their hardware with other AWS customers
- Dedicated Hosts can be interrupted by AWS with two minutes' notice
- Dedicated Hosts are billed only through Compute Savings Plans
Answer
A. Both options run on hardware dedicated to a single customer, but a Dedicated Host is a whole physical server allocated to the customer, with visibility into its sockets and cores and control over instance placement. Dedicated Instances isolate hardware at the instance level without exposing the underlying host.
CLF-C02 question 207
A company runs nightly image-processing jobs that can be stopped and restarted without losing work. The jobs have no fixed deadline within the night. Which EC2 pricing option is the most cost-effective?
- Spot Instances
- On-Demand Instances
- On-Demand Capacity Reservations
- Dedicated Hosts
Answer
A. Spot Instances use spare EC2 capacity at a steep discount and suit flexible, fault-tolerant work that can handle interruptions. On-Demand would work but costs more, and Dedicated Hosts and Capacity Reservations add cost rather than reduce it.
CLF-C02 question 16
A company wants a single pricing commitment that also lowers the cost of its serverless workloads. Which services are covered by Compute Savings Plans? (Choose two.)
- AWS Fargate
- AWS Lambda
- Amazon DynamoDB
- Amazon S3
- Amazon Route 53
Answer
A, B. Compute Savings Plans apply to Amazon EC2, AWS Fargate and AWS Lambda usage, regardless of instance family or Region. Storage, NoSQL database and DNS services are not covered by Compute Savings Plans.
CLF-C02 question 300