Master cost optimisation strategies: right-sizing, Reserved Instances, Spot, S3 lifecycle, and serverless. Use AWS cost tools effectively.
Cost Optimisation — Pay Less, Get More
AWS cost optimisation is a key pillar of the Well-Architected Framework. A Solutions Architect must balance performance, reliability, AND cost. The goal is to eliminate waste while maintaining the service level your users need.
Teacher Note: Think of AWS like a utilities bill. You pay for electricity, water, and gas. If you leave lights on in empty rooms, your bill is higher. AWS is the same — idle resources, oversized instances, and unnecessary data transfers all cost money. A good architect turns off the lights.
Seven Ways to Reduce AWS Costs
| Strategy | How | Savings |
|---|
| Right-sizing | Use Compute Optimizer — downsize over-provisioned instances | 20-40% |
| Reserved Instances / Savings Plans | Commit to 1-3 years for steady workloads | 40-60% |
| Spot Instances | Use for fault-tolerant batch jobs | 70-90% |
| S3 Lifecycle Policies | Auto-move old files to cheaper storage classes | 40-90% on storage |
| Delete Orphaned Resources | EBS volumes, Elastic IPs, old snapshots you forgot about | Variable |
| CloudFront | Reduce data transfer cost — edge caches reduce origin requests | 50-90% on transfer |
| Serverless (Lambda) | Pay only per request — zero idle cost | Often 80-90% vs EC2 |
AWS Cost Tools
| Tool | Purpose |
|---|
| Cost Explorer | Visualise and analyse spending by service, region, and time |
| AWS Budgets | Set budget alerts — email when spending exceeds threshold |
| Compute Optimizer | ML-based right-sizing recommendations for EC2, Lambda, EBS |
| Trusted Advisor | Automated checks: cost, security, performance, fault tolerance |
| Cost Allocation Tags | Tag resources by Team/Project/Environment for accurate billing breakdown |
Key Principle: Match Workload to Service
Steady 24/7 web server --> EC2 Reserved Instance
Variable traffic web app --> Lambda or Auto Scaling with Spot
Batch processing job --> Spot Instances (70-90% cheaper)
7-year compliance archive --> S3 Glacier Deep Archive
Infrequent database backup --> S3 Standard-IA or Glacier
Dev environment weekdays --> Schedule stop at 6pm, start at 8am
Exam Tip: Cost optimisation questions often involve choosing between: Lambda (pay per invocation) vs EC2 (pay by hour). For very low or very spiky traffic: Lambda. For steady high traffic: EC2 Reserved. For batch: Spot. AWS Budgets + Cost Allocation Tags + Compute Optimizer together = a complete cost management strategy.