1.5 Cost Optimization & Visibility
Visibility Tools
AWS Cost Explorer
- Function: Historical analysis (up to 12 months) and forecasting (up to 12 months).
- Granularity: Daily or Monthly (Hourly requires enabling and extra cost).
AWS Budgets
- Function: Alerts when costs or usage exceed thresholds.
- Action: Can trigger Actions (stop EC2, apply SCP) via Chatbot/SNS.
Cost Allocation Tags
- User-Defined: Must be activated in the Billing Console before they appear in reports.
- AWS-Generated:
createdBytags (must also be activated).
Purchasing Options (Cheatsheet)
| Option | Term | Discount | Flexibility |
|---|---|---|---|
| Standard RI | 1 or 3 yr | High (up to 72%) | Low (Can’t change family/OS) |
| Convertible RI | 1 or 3 yr | Medium (up to 54%) | Medium (Can change family/OS) |
| Savings Plans (Compute) | 1 or 3 yr | High (up to 66%) | Highest (EC2 + Lambda + Fargate, Any Region, Any Family) |
| Savings Plans (EC2) | 1 or 3 yr | Highest (up to 72%) | Low (Specific Family + Region) |
| Spot Instances | N/A | Max (up to 90%) | None (Can be interrupted with 2 mins notice) |
WARNING
Exam Gotcha: Compute Savings Plans apply to usage across any region. EC2 Instance Savings Plans are locked to a specific region.
Rightsizing
- AWS Compute Optimizer:
- Scope: EC2, Auto Scaling Groups, EBS Volumes, Lambda functions.
- Data: Uses last 14 days of CloudWatch metrics (CPU, Memory, Network, Disk).
- Requirement: Needs CloudWatch Agent for Memory metrics to give accurate recommendations.
WARNING
Exam Gotcha: Compute Optimizer recommends based on historical data. It does not predict future load spikes that haven’t happened yet.