Skip to content
intermediate Phase 18 · Advanced Cloud Operations

Capacity Planning

Forecast resource needs with Trusted Advisor, compute optimizer, and usage trends to right-size and plan for growth.

50m
0 problems
Topic Progress 0%

Compute Optimizer and Right-Sizing

AWS Compute Optimizer uses machine learning to analyze historical utilization metrics and recommend optimal AWS compute resources. It helps you avoid over-provisioning (wasting money) and under-provisioning (hurting performance).

How Compute Optimizer Works compares your resource utilization against patterns from thousands of AWS customers. It analyzes CPU, memory, network, and disk utilization data over a 14-day period. For each resource, it recommends the optimal instance type and size. Recommendations include: Under-provisioned (performance risk), Over-provisioned (cost waste), Optimally provisioned, and None (insufficient data).

Supported Services include EC2 instances, EBS volumes, Lambda functions, and Auto Scaling groups. For EC2, Compute Optimizer analyzes instance types across families and recommends migrations to more appropriate families. For example, an m5.xlarge running at 20% CPU might be right-sized to a t3.large, saving 60% on compute costs.

Confidence Levels indicate recommendation reliability. High confidence means strong historical data supports the recommendation. Low confidence suggests more data is needed. Always validate low-confidence recommendations with application-specific benchmarks before implementing changes.

EBS Volume Optimization identifies volumes with low IOPS or throughput utilization. Compute Optimizer might recommend migrating from io2 to gp3 volumes, which offer better price-performance for many workloads.

Lambda Right-Sizing analyzes memory allocation and execution duration. Functions with consistently low memory usage can be downgraded to reduce costs. Since Lambda pricing is based on memory and duration, right-sizing directly impacts cost.

Usage Forecasting and Savings Optimization

Effective capacity planning requires forecasting future needs based on historical trends, business growth, and seasonal patterns.

Usage Trending Analysis examines historical resource utilization to identify growth patterns. Use CloudWatch metrics and Cost Explorer to analyze trends over 3-12 months. Identify steady-state growth, seasonal peaks, and anomalous usage. For example, an e-commerce platform might see 3x traffic increases during holiday seasons.

Forecasting Methods include linear regression for steady growth, seasonal decomposition for predictable patterns, and machine learning models for complex demand signals. AWS Cost Explorer provides cost forecasting based on historical spending patterns. Combine technical metrics with business metrics for accurate forecasts.

Reserved Capacity Planning matches committed-use discounts to predictable workloads. Compute Savings Plans offer up to 72% discount for 1-year or 3-year commitments. EC2 Instance Savings Plans provide deeper discounts for specific instance families. A workload running 24/7 with stable needs is ideal for 3-year reserved capacity.

Savings Optimization combines multiple pricing strategies. Use Reserved Instances or Savings Plans for baseline capacity. Use Spot Instances for fault-tolerant workloads like batch processing. Use On-Demand for variable workloads. This tiered approach optimizes costs while maintaining flexibility.

Auto Scaling Policies dynamically adjust capacity based on demand. Target tracking maintains a target metric value. Step scaling adjusts capacity in response to CloudWatch alarm thresholds. Scheduled scaling anticipates known demand patterns. Predictive scaling uses ML to forecast traffic and pre-provision capacity.

Quiz

1. How does AWS Compute Optimizer generate recommendations?

Question 1 options

2. What is optimal for a 24/7 predictable workload?

Question 2 options

3. When should Spot Instances be used for capacity planning?

Question 3 options

4. What is the purpose of predictive scaling?

Question 4 options

Flashcards

Question

What is Compute Optimizer?

Answer

AWS service using ML to analyze 14-day utilization and recommend optimal EC2, EBS, Lambda, and Auto Scaling configurations.

Question

What are the Compute Optimizer recommendation types?

Answer

Under-provisioned (performance risk), Over-provisioned (cost waste), Optimally provisioned, and None (insufficient data).

Question

What is the savings tier strategy?

Answer

Savings Plans for baseline, Spot for flexible workloads, On-Demand for variable workloads.

Question

What is predictive scaling?

Answer

Uses ML to forecast traffic and proactively provision capacity before demand spikes.

Revision Notes

Key Takeaways

  • 1. Compute Optimizer uses ML to right-size resources based on 14-day utilization
  • 2. Tiered pricing: Savings Plans for baseline, Spot for flexible, On-Demand for variable
  • 3. Predictive scaling proactively provisions capacity using ML forecasting
  • 4. Always validate low-confidence recommendations before production changes

Interview Tips

  • Explain how Compute Optimizer determines right-sizing recommendations
  • Describe a three-tier pricing strategy for a SaaS workload
  • Walk through capacity planning for a seasonal e-commerce platform
  • Discuss how to validate Compute Optimizer recommendations safely

Cheat Sheet

Compute Optimizer: ML-based right-sizing for EC2, EBS, Lambda. 14-day analysis, confidence levels. Savings tiers: Reserved/Savings Plans (baseline) + Spot (flexible) + On-Demand (variable). Predictive scaling uses ML for proactive capacity.