Design Cost Optimized Architectures · Topic 2 of 5
Cost Optimized Compute
Cut AWS compute cost with On-Demand, Reserved Instances, Savings Plans, Spot, right sizing, Graviton, Auto Scaling and serverless for each workload.
- 5 min
- On-Demand has no commitment, and commitments such as Savings Plans or Reserved Instances lower the price for steady use.
- Compute Savings Plans are the most flexible, and EC2 Instance Savings Plans trade flexibility for a bigger discount.
- Convertible Reserved Instances can be exchanged, and Standard ones give the larger discount.
What it is
Compute is often the largest part of an AWS bill. You lower it with two levers: pay a lower price for the same capacity (by choosing how you buy it) and use less capacity (by right sizing and scaling).
The exam gives a workload pattern, such as steady, spiky, interruptible or short lived, and asks for the cheapest option that still meets the requirement. Reading the pattern correctly is most of the answer.
How it works
EC2 purchase options
| Option | How it works | Best for |
|---|---|---|
| On-Demand | Pay per second or hour with no commitment | Short, unpredictable or new workloads |
| Reserved Instances | Commit to a specific instance configuration for one or three years | Steady, predictable workloads |
| Savings Plans | Commit to a spend per hour for one or three years | Steady usage with flexibility to change instances |
| Spot Instances | Spare capacity at a large discount, but AWS can reclaim it | Fault tolerant, flexible or interruptible work |
| Dedicated Hosts | A physical server for your use | Software licensed per socket or core, or compliance needs |
| Capacity Reservations | Reserves capacity in an AZ without a pricing discount | Guaranteed capacity at a time of need |
Longer commitments and more upfront payment mean bigger discounts. Reserved Instances come as Standard (larger discount, less flexible) or Convertible (smaller discount, can be exchanged for other configurations).
Compute Savings Plans apply across instance families, sizes, Regions, operating systems, and also to AWS Fargate and AWS Lambda usage. EC2 Instance Savings Plans give a larger discount in return for committing to one instance family in one Region. Savings Plans are usually the more flexible answer, and Reserved Instances can be the answer when the question describes a fixed instance type and Region.
Spot Instances
Spot Instances can cost much less than On-Demand, but AWS can reclaim them with a two minute warning. Use them for batch processing, big data, continuous integration jobs, rendering, containers and stateless web fleets.
Make the work resilient: keep state in S3 or a database, break jobs into small pieces, and spread across several instance types and AZs. An Auto Scaling group with a mixed instances policy can combine a base of On-Demand or Reserved capacity with Spot capacity on top.
Right sizing and scheduling
AWS Compute Optimizer analyzes usage and recommends smaller or different instance types, and it can also review EBS volumes and Lambda functions. Over provisioned instances are waste, and low CPU use over several weeks is the classic sign.
Turn off what is not needed. A development environment that runs only in business hours can be stopped at night, for example with AWS Instance Scheduler. Auto Scaling scales in during quiet periods, so you pay only for needed capacity.
AWS Graviton instances often give better price performance than comparable x86 instances for software that supports Arm.
Serverless and containers
Lambda charges for requests and for run time, with nothing to pay while idle, so it is cost efficient for spiky or low volume workloads. For very steady, heavy, long running load, always on instances can be cheaper.
Fargate charges for the virtual CPU and memory that tasks request, with no idle host to pay for. Fargate Spot gives a discount for interruptible tasks. For large steady container fleets, EC2 instances with Savings Plans can cost less.
Choosing by pattern
- Steady and predictable for years: Savings Plans or Reserved Instances.
- Unpredictable or short term: On-Demand.
- Fault tolerant batch or flexible start times: Spot.
- Spiky, event driven, low volume: Lambda.
- Licensing tied to physical cores: Dedicated Hosts.
Look for the interruption words. "Can tolerate interruptions" or "flexible start and end time" means Spot. "Steady state for three years" means a three year commitment.
What to remember for the exam
- On-Demand has no commitment, and commitments such as Savings Plans or Reserved Instances lower the price for steady use.
- Compute Savings Plans are the most flexible, and EC2 Instance Savings Plans trade flexibility for a bigger discount.
- Convertible Reserved Instances can be exchanged, and Standard ones give the larger discount.
- Spot is cheapest, but can be reclaimed with a two minute notice, so use it only for fault tolerant work.
- Use a mixed instances policy to combine On-Demand base capacity with Spot.
- Compute Optimizer recommends right sizing.
- Stop or scale in what you do not use, including non production environments.
- Lambda and Fargate remove idle host cost for spiky workloads.
Common mistakes
Using Spot for a database or a stateful single instance. Interruption can cause data loss or downtime.
Buying a three year commitment for a short project. The discount is worthless if the usage ends early.
Choosing Reserved Instances when flexibility is required. Compute Savings Plans cover changes in family, size and Region better.
Ignoring idle resources. Stopped instances do not charge for compute, but attached EBS volumes and unused Elastic IPs can still cost money.
A Savings Plan commits you to a spend per hour whether you use it or not, so size the commitment to your steady baseline and cover the spikes with On-Demand or Spot.
Check yourself
Which purchase option fits fault tolerant batch jobs at the lowest price?
Spot Instances, which AWS can reclaim with a short warning.
What is the main advantage of Compute Savings Plans over Standard Reserved Instances?
They apply across instance families, sizes and Regions, and also cover Fargate and Lambda.
Which service recommends smaller instance sizes based on usage?
AWS Compute Optimizer.
Topic 2 of 5 in Design Cost Optimized Architectures
Test yourself on Design Cost Optimized Architectures
The full AWS SAA-C03 question bank has 823 questions, with timed practice exams and an explanation for every answer.
This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.