← Back to Index
Chapter 19 of 20

Cost Optimization Strategies

Domain 4 — Cost-Optimized Architectures (20%)
💰
Question 1Scenario

A company runs EC2 instances 24/7 for a stable, predictable production workload and plans to do so for 3 years. They want the maximum possible discount and are comfortable committing to a specific instance type in a single region. Which purchasing option gives the highest discount?

Explanation

Standard RIs offer the highest discount of all RI types. Paying All Upfront maximises savings compared to Partial Upfront or No Upfront. The trade-off: you're locked into a specific instance type, region, OS, and tenancy for 1 or 3 years. Compute Savings Plans offer similar savings with more flexibility but slightly lower maximum discount.

Question 2Scenario

A company uses a mix of EC2 instance types and sizes, and frequently changes their compute needs. They want a significant discount over On-Demand without committing to specific instance families or regions. Which option provides this flexibility?

Explanation

Savings Plans types: (1) Compute Savings Plans — most flexible, applies to EC2/Lambda/Fargate anywhere. (2) EC2 Instance Savings Plans — highest discount after Standard RIs, locked to instance family + region. Both require a $/hour commitment for 1 or 3 years. Savings Plans are the modern replacement for RIs and are simpler to manage.

Question 3Scenario

A company wants to run a fault-tolerant, stateless web tier that can scale down to zero during off-peak hours and does not require guaranteed availability. Which EC2 pricing model provides the lowest cost for this workload?

Explanation

Spot Instances use spare AWS capacity at steep discounts. AWS can reclaim them with a 2-minute warning when capacity is needed. Best uses: stateless web servers, batch processing, CI/CD, big data analytics, containerised workloads, and ML training jobs. Use Spot with Auto Scaling Spot Fleet to handle interruptions automatically by launching replacement capacity.

Question 4Scenario

A company suspects their EC2 instances are over-provisioned — running at 5–10% CPU utilisation consistently. Which AWS service analyses actual utilisation metrics and recommends right-sized instance types?

Explanation

AWS Compute Optimizer uses ML to analyse CloudWatch metrics (CPU, memory, disk, network) over up to 14 weeks and recommends optimal configurations. It covers EC2 instances, Auto Scaling groups, EBS volumes, Lambda functions, ECS on Fargate, and RDS. Recommendations show projected cost savings and performance improvement estimates.

Question 5Scenario

A company stores compliance log files in S3. Files are accessed daily for the first 30 days. After 30 days they are rarely accessed. They must be retained for 7 years. What is the MOST cost-effective S3 storage strategy?

Explanation

S3 Glacier Deep Archive is the lowest-cost AWS storage class (~$0.00099/GB/month), designed for long-term retention of data accessed once or twice per year. Retrieval takes 12–48 hours. S3 Lifecycle Policies automate transitions between storage classes. The tiered approach: Standard (hot) → Standard-IA (warm) → Glacier Deep Archive (cold) optimises cost across the retention lifecycle.