4.1 - Cost-optimized compute (Spot, Reserved, right-sizing)
AWS Solutions Architect Associate objective 4.1 covers optimising compute cost. Spot Instances give the deepest discount for a fault-tolerant, interruptible batch workload that can restart if AWS reclaims capacity. For a workload that will run a fixed instance type 24/7 for a long term - say an m5.large for three years in one Region - a three-year Standard Reserved Instance (or a Savings Plan) gives the largest steady-state discount. When a team suspects many EC2 instances are oversized, AWS Compute Optimizer provides data-driven, machine-learning right-sizing recommendations to cut waste. You should also weigh On-Demand for unpredictable use, Graviton for price-performance, and Auto Scaling to avoid idle capacity. Expect scenario questions that describe interruptible jobs, steady long-running load, or suspected over-provisioning, and ask which cost-optimized compute choice - Spot, Reserved Instances or Compute Optimizer right-sizing - applies.
Interruptible batch, deepest discount = Spot. Fixed type 24/7 for years = Reserved Instances / Savings Plans. Suspected oversized instances = Compute Optimizer right-sizing. Unpredictable = On-Demand.
Practice questions
1. Which purchase option gives the deepest discount for a fault-tolerant batch job that can restart if interrupted?
- On-Demand Instances
- Reserved Instances
- Spot Instances (correct answer)
- Dedicated Hosts
Spot Instances use spare capacity at up to ~90% off but can be reclaimed with a 2-minute notice, perfect for interruption-tolerant, restartable batch work.
2. A steady 24/7 production workload runs on EC2 for at least a year. Which option lowers cost with the most flexibility across instance families?
- Standard Reserved Instances
- Dedicated Hosts
- Spot Instances
- Compute Savings Plans (correct answer)
Compute Savings Plans give up to ~66% off for a 1- or 3-year hourly commitment and apply across instance families, sizes, Regions, and even Fargate/Lambda, offering the most flexibility.
3. Which pair of tools lets you visualize past AWS spend and get alerted when forecast spend exceeds a threshold?
- AWS Cost Explorer and AWS Budgets (correct answer)
- Amazon CloudWatch and AWS Config
- AWS Trusted Advisor and Amazon Inspector
- AWS CloudTrail and Amazon Macie
Cost Explorer visualizes and analyzes historical spend and usage; Budgets sends alerts when actual or forecasted cost/usage crosses a threshold you set.
4. Backups must be retained seven years, are rarely restored, and a 12-hour restore time is acceptable. Which storage is cheapest for this?
- S3 Standard for durability
- S3 Standard-IA for infrequent access
- S3 Glacier Flexible Retrieval
- S3 Glacier Deep Archive (correct answer)
Deep Archive is the lowest-cost S3 class, designed for long-term retention rarely accessed, with retrieval in about 12 hours (standard) - a perfect fit here. Standard/Standard-IA cost far more for cold, seldom-read data.
5. An interruptible batch job runs on many EC2 types, and you want the lowest compute price while tolerating occasional reclaims. Which option fits?
- Spot Instances via a diversified fleet (correct answer)
- On-Demand instances for guaranteed capacity
- Dedicated Hosts for isolation
- A single 3-year Reserved Instance
Spot Instances offer the lowest price for interruption-tolerant work; using a diversified Spot fleet across many instance types reduces the chance of mass reclaim. On-Demand and RIs cost more for this pattern.
6. A workload will run a fixed m5.large 24/7 for three years in one Region with no need for family flexibility. Which option gives the deepest possible discount?
- A Compute Savings Plan committed for one year across all families
- On-Demand pricing to preserve maximum operational flexibility
- Spot Instances to exploit spare capacity for the whole term
- A three-year Standard Reserved Instance for that specific instance type (correct answer)
A 3-year Standard RI (ideally all-upfront) for a known, unchanging instance type gives the deepest commitment discount, since family flexibility is not needed. Compute Savings Plans trade a bit of discount for flexibility.