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: createdBy tags (must also be activated).

Purchasing Options (Cheatsheet)

OptionTermDiscountFlexibility
Standard RI1 or 3 yrHigh (up to 72%)Low (Can’t change family/OS)
Convertible RI1 or 3 yrMedium (up to 54%)Medium (Can change family/OS)
Savings Plans (Compute)1 or 3 yrHigh (up to 66%)Highest (EC2 + Lambda + Fargate, Any Region, Any Family)
Savings Plans (EC2)1 or 3 yrHighest (up to 72%)Low (Specific Family + Region)
Spot InstancesN/AMax (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.