SAA-C03Chapter 181 of 189Objective 4.5

AWS Compute Optimizer

This chapter covers AWS Compute Optimizer, a service that uses machine learning to analyze your AWS compute resource utilization and provide recommendations for cost savings and performance improvements. For the SAA-C03 exam, Compute Optimizer appears in roughly 5-10% of questions, primarily within the Cost Optimized domain (Objective 4.5). You will need to understand its purpose, supported resources, recommendation logic, and integration with other services like CloudWatch and Trusted Advisor. Mastering this topic will help you identify when to use Compute Optimizer versus other cost management tools.

25 min read
Intermediate
Updated May 31, 2026

AWS Compute Optimizer as a Cloud Efficiency Auditor

Imagine you are a facilities manager overseeing a large office building with hundreds of rooms. Each room has a specific purpose and a set of resources like desks, lighting, and HVAC. Over time, some rooms become over-provisioned—they have more desks and cooling than needed, wasting energy and space. Others are under-provisioned, causing employee discomfort. AWS Compute Optimizer acts like an efficiency auditor who analyzes historical usage patterns of each room (e.g., how many employees actually use it, at what times, and for how long). The auditor then produces a report recommending specific adjustments: "Room 101: Reduce desks from 20 to 12, dim lighting by 30%" or "Room 205: Increase HVAC capacity by 15%." The auditor does not implement changes—they just provide recommendations. The facilities manager (you) reviews the report and decides whether to act. Similarly, Compute Optimizer analyzes historical resource utilization of your AWS compute resources (EC2 instances, Auto Scaling groups, etc.) and gives recommendations to right-size or change families to save cost or improve performance. It uses machine learning models trained on millions of AWS customers' usage patterns to make these suggestions. The key mechanism: it collects CloudWatch metrics (CPU, memory, network I/O) over the past 14 days, then compares your resource's utilization against optimal thresholds. If your instance consistently uses less than 40% CPU, it may recommend a smaller instance type. If memory pressure is high, it may suggest a memory-optimized family. The analogy holds: the auditor never moves furniture, but their insights enable data-driven decisions.

How It Actually Works

What is AWS Compute Optimizer?

AWS Compute Optimizer is a recommendation service that analyzes the historical utilization patterns of your AWS compute resources and provides rightsizing recommendations to reduce costs and improve performance. It uses machine learning models trained on billions of resource metric observations from AWS customers to identify optimal resource configurations. The service is free of charge for EC2 instances, Auto Scaling groups, and Lambda functions, but there is a charge for analyzing EBS volumes.

Why It Exists

Cloud resources are often over-provisioned or under-provisioned. Over-provisioning wastes money; under-provisioning hurts performance. Compute Optimizer addresses this by giving data-driven recommendations based on actual usage rather than guesswork. It helps you implement the AWS Well-Architected Framework's Cost Optimization pillar by continuously identifying savings opportunities.

How It Works Internally

Compute Optimizer works in three phases: data collection, analysis, and recommendation generation.

Data Collection: Compute Optimizer uses CloudWatch metrics from your resources. For EC2 instances, it collects CPU utilization, memory utilization (if the CloudWatch agent is installed), network in/out, and disk read/write. It requires at least 14 days of historical data to generate recommendations. Data is collected every 5 minutes for most metrics, but for memory, it depends on the CloudWatch agent configuration.

Analysis: The service runs the collected metrics through machine learning models. These models are trained on anonymized usage patterns from millions of AWS customers. The models identify patterns that indicate over-provisioning (e.g., sustained low CPU) or under-provisioning (e.g., high CPU with memory pressure). The analysis considers workload characteristics like periodic spikes, baseline usage, and resource bottlenecks.

Recommendation Generation: Based on the analysis, Compute Optimizer produces a list of recommended instance types or sizes. Recommendations are categorized as: - Over-provisioned: The resource is larger than needed; downsizing is recommended. - Under-provisioned: The resource is too small; upgrading is recommended. - Optimized: The resource is appropriately sized. - None: Insufficient data to generate a recommendation.

Each recommendation includes:

Current instance type

Recommended instance type

Estimated monthly savings (in USD)

Performance risk: low, medium, or high (indicates likelihood of performance degradation if recommendation is applied)

Reason for recommendation (e.g., "CPU over-provisioned")

Key Components, Values, Defaults, and Timers

Supported Resources: EC2 instances, Auto Scaling groups, Lambda functions, EBS volumes (gp2, gp3, io1, io2, st1, sc1, standard).

Minimum Data Requirement: 14 days of CloudWatch metrics. Without this, recommendations show as "Insufficient Data."

Recommendation Refresh: Recommendations are updated daily.

Performance Risk Thresholds: Low risk means high confidence that the new instance type will perform adequately. Medium/high risk indicates potential performance issues.

Metrics Used for EC2: CPU utilization (average, maximum), memory utilization (if agent installed), network throughput, disk I/O.

Metrics for EBS: Volume read/write throughput, IOPS, queue depth.

Metrics for Lambda: Duration, memory utilization, invocation count.

Configuration and Verification Commands

You can enable Compute Optimizer from the AWS Management Console, CLI, or SDK. To enable using AWS CLI:

aws compute-optimizer update-enrollment-status --status Active

To get recommendations for all EC2 instances:

aws compute-optimizer get-ec2-instance-recommendations

To filter by instance ARN:

aws compute-optimizer get-ec2-instance-recommendations --instance-arns arn:aws:ec2:us-east-1:123456789012:instance/i-0abcd1234

To enable enhanced infrastructure metrics (additional CloudWatch metrics) for better recommendations:

aws compute-optimizer export-ec2-instance-recommendations --s3-destination-config bucket=my-bucket

How It Interacts with Related Technologies

CloudWatch: Primary data source. Without CloudWatch metrics, Compute Optimizer cannot function. Memory metrics require the CloudWatch agent on the instance.

Trusted Advisor: Trusted Advisor provides high-level cost optimization checks (e.g., underutilized EC2 instances), but Compute Optimizer gives more granular, ML-based recommendations.

AWS Cost Explorer: Cost Explorer shows historical spending, while Compute Optimizer gives actionable rightsizing recommendations.

AWS Auto Scaling: Compute Optimizer can recommend optimal instance types for Auto Scaling groups, which can be used to update launch configurations or launch templates.

AWS Organizations: Compute Optimizer can be enabled at the account level or organization level to get a consolidated view.

Limitations and Edge Cases

Compute Optimizer does not recommend changing instance families if the new family does not support the same features (e.g., EBS optimization, enhanced networking). It respects these constraints.

For instances with burstable performance (T-series), recommendations may suggest moving to standard instances if the CPU credit balance is consistently low.

Lambda recommendations require at least 7 days of invocations.

EBS volume recommendations are based on 14 days of usage and consider volume type, size, and performance.

Compute Optimizer does not consider reserved instances or savings plans in its savings calculations; it assumes On-Demand pricing.

It cannot make recommendations for resources that are not running or have been terminated.

Exam Tips

Remember that Compute Optimizer is a recommendation engine, not an automation tool. It does not automatically resize resources.

The minimum data requirement is 14 days for EC2 and EBS, 7 days for Lambda.

Memory utilization is not collected by default for EC2; you must install the CloudWatch agent.

The service is free for EC2, Auto Scaling groups, and Lambda; EBS analysis incurs charges.

Performance risk is a key differentiator: low risk means safe to change; high risk means avoid unless necessary.

Compute Optimizer can be used alongside AWS Compute Savings Plans to optimize costs further.

On the exam, if a question asks about rightsizing recommendations based on historical usage, think Compute Optimizer. If it asks about real-time or proactive scaling, think Auto Scaling.

Walk-Through

1

Enable Compute Optimizer

First, you must opt in to Compute Optimizer. You can do this via the AWS Management Console by navigating to the Compute Optimizer dashboard and clicking 'Opt in'. Alternatively, use the CLI command 'aws compute-optimizer update-enrollment-status --status Active'. This enables the service to start collecting and analyzing data. Note that the service requires IAM permissions to read CloudWatch metrics and EC2 instance metadata. The default service-linked role AWSServiceRoleForComputeOptimizer is automatically created, granting necessary permissions.

2

Data Collection Period

Once enabled, Compute Optimizer begins collecting CloudWatch metrics from your supported resources. For EC2 instances, it gathers CPU utilization, network throughput, and disk I/O. Memory utilization is only collected if the CloudWatch agent is installed and configured to report memory metrics. The service requires at least 14 consecutive days of data to generate meaningful recommendations. During this period, the status shows 'Insufficient Data'. This step is passive—no action is needed from you.

3

Machine Learning Analysis

After collecting sufficient data, Compute Optimizer runs the metrics through ML models. These models compare your resource's utilization patterns against patterns observed from millions of AWS customers. The models identify whether the resource is over-provisioned (e.g., average CPU < 40%), under-provisioned (e.g., high CPU with memory pressure), or optimally sized. The analysis considers not just averages but also peaks and variability. For example, a web server that spikes to 90% CPU during business hours but averages 30% may be considered optimized if the spikes are handled without degradation.

4

Recommendation Generation

Based on the analysis, Compute Optimizer generates recommendations. Each recommendation includes the current resource configuration, one or more recommended configurations, estimated monthly savings (assuming On-Demand pricing), and a performance risk rating. The risk rating indicates the likelihood that the new configuration will meet the same performance requirements. Low risk means high confidence; high risk means there is a chance of performance degradation. Recommendations are updated daily. You can view them in the console or export them to S3 for further analysis.

5

Review and Apply Recommendations

As a user, you review the recommendations and decide whether to apply them. For EC2 instances, you can manually resize the instance (if it's a supported type) or modify the Auto Scaling group launch configuration. Compute Optimizer does not automatically apply changes. You can also use AWS Systems Manager Automation to create runbooks that apply recommendations automatically, but that is a custom solution. After applying changes, monitor the resource to ensure performance remains acceptable. Compute Optimizer will continue to provide updated recommendations based on new usage patterns.

What This Looks Like on the Job

Enterprise Scenario 1: E-commerce Platform Rightsizing

A large e-commerce company runs a fleet of 500 EC2 instances for their web tier, using m5.large instances. After a major sales event, they notice their bill is high but utilization is low. They enable Compute Optimizer and after 14 days, get recommendations to downsize 300 instances to m5.medium, saving $15,000/month. However, they also see that 50 instances are under-provisioned during peak hours and should be upgraded to m5.xlarge. The team reviews the performance risk: low for downsizing, medium for upgrading. They apply downsizing immediately but schedule upgrades before the next sale. They also notice that memory metrics are missing because the CloudWatch agent wasn't installed. After installing it, Compute Optimizer provides more accurate recommendations, including memory-optimized instances for memory-intensive workloads.

Enterprise Scenario 2: Lambda Function Optimization

A SaaS provider uses hundreds of Lambda functions for backend processing. They enable Compute Optimizer and find that 30% of functions have memory settings too high, wasting money. For example, a function processing image thumbnails is allocated 1024 MB but consistently uses only 256 MB. Compute Optimizer recommends lowering it to 512 MB, saving $0.20 per million invocations. Conversely, a data processing function with 128 MB is throttling due to high memory usage; recommendation is to increase to 256 MB. The team uses the recommendations to update function configurations via Infrastructure as Code (e.g., AWS CloudFormation). They also set up a weekly review of new recommendations.

Misconfiguration Consequences

A common mistake is not installing the CloudWatch agent for memory metrics. This leads to incomplete data and potentially inaccurate recommendations. For instance, an instance might have low CPU but high memory pressure; without memory data, Compute Optimizer might recommend downsizing, causing performance degradation. Another pitfall is ignoring performance risk ratings: applying a high-risk recommendation can lead to application instability. In one case, a company downsized a database server based solely on CPU metrics, causing I/O bottlenecks and increased latency. They had to roll back. Always validate recommendations with load testing before applying to production.

How SAA-C03 Actually Tests This

SAA-C03 Exam Focus on AWS Compute Optimizer

Objective Codes: This topic falls under Domain 4: Cost Optimized, Objective 4.5: Manage costs by using cost-optimized compute resources. The exam tests your ability to identify the right tool for rightsizing recommendations.

Common Wrong Answers and Why Candidates Choose Them: 1. Choosing AWS Trusted Advisor instead of Compute Optimizer: Candidates often pick Trusted Advisor because it also provides cost optimization checks. However, Trusted Advisor only checks for underutilized instances based on simple thresholds (e.g., CPU < 10% for 14 days). Compute Optimizer uses ML and provides more granular recommendations, including rightsizing and family changes. Trusted Advisor is a high-level check; Compute Optimizer is the go-to for detailed rightsizing. 2. Thinking Compute Optimizer automatically resizes instances: The name 'Optimizer' implies automation, but it only recommends. The exam will test that you know it is advisory only. 3. Believing memory metrics are always available: Many candidates assume CloudWatch collects memory by default. It does not. You must install the CloudWatch agent. The exam may present a scenario where Compute Optimizer cannot make memory-based recommendations because the agent is missing. 4. Confusing Compute Optimizer with AWS Auto Scaling: Auto Scaling adjusts capacity in real-time based on policies. Compute Optimizer gives periodic recommendations for rightsizing. They complement each other but serve different purposes.

Specific Numbers and Values to Memorize: - Minimum 14 days of data for EC2 and EBS recommendations. - Minimum 7 days for Lambda recommendations. - Performance risk levels: Low, Medium, High. - Free for EC2, Auto Scaling groups, Lambda; charge for EBS. - Recommendations updated daily.

Edge Cases and Exceptions: - If an instance is stopped, Compute Optimizer cannot generate recommendations until it is running and accumulating metrics. - For Auto Scaling groups, recommendations apply to the group's launch template/configuration, not individual instances. - Compute Optimizer does not support all instance families (e.g., bare metal, some older types). - When using Compute Optimizer with Reserved Instances, the savings estimate does not account for RIs; it assumes On-Demand pricing.

How to Eliminate Wrong Answers: - If the question mentions 'machine learning' or 'rightsizing recommendations', the answer is Compute Optimizer. - If the question asks for automatic scaling, eliminate Compute Optimizer. - If the question is about cost exploration (e.g., 'which service shows cost trends?'), it's Cost Explorer. - If the question is about high-level checks (e.g., 'which service identifies idle instances?'), it could be Trusted Advisor, but for detailed recommendations, it's Compute Optimizer.

Key Takeaways

AWS Compute Optimizer is a recommendation engine, not an automation tool.

Minimum 14 days of CloudWatch metrics are required for EC2 and EBS recommendations; 7 days for Lambda.

Memory metrics require the CloudWatch agent to be installed on EC2 instances.

Compute Optimizer is free for EC2, Auto Scaling groups, and Lambda; EBS analysis incurs charges.

Recommendations include estimated monthly savings (On-Demand pricing) and performance risk ratings.

The service is updated daily; recommendations can be exported to S3.

Use Compute Optimizer for rightsizing, not for real-time scaling (use Auto Scaling for that).

Easy to Mix Up

These come up on the exam all the time. Here's how to tell them apart.

AWS Compute Optimizer

Uses machine learning models trained on millions of AWS customers

Provides granular rightsizing recommendations (specific instance type/size)

Requires 14 days of CloudWatch metrics to generate recommendations

Supports EC2, Auto Scaling groups, Lambda, and EBS volumes

Gives performance risk ratings (low/medium/high) for each recommendation

AWS Trusted Advisor (Cost Optimization Checks)

Uses static threshold rules (e.g., CPU < 10% for 14 days)

Provides high-level checks (e.g., underutilized instances, idle load balancers)

Works with minimal data (checks current state and short history)

Covers a broader range of services (EC2, RDS, ELB, etc.)

Does not provide risk ratings; only indicates pass/fail

Watch Out for These

Mistake

Compute Optimizer automatically resizes EC2 instances based on its recommendations.

Correct

Compute Optimizer only provides recommendations. It does not automatically modify any resources. You must manually apply changes or use automation tools like AWS Systems Manager.

Mistake

Compute Optimizer requires no additional setup to capture memory utilization.

Correct

Memory utilization is not captured by default. You must install the CloudWatch agent on your EC2 instances and configure it to report memory metrics. Without it, Compute Optimizer cannot make memory-based recommendations.

Mistake

Compute Optimizer works with any EC2 instance type, including bare metal.

Correct

Compute Optimizer supports most current-generation instance types but does not support bare metal instances (e.g., i3.metal) or some older types. It also cannot recommend changes if the new type lacks required features (e.g., EBS optimization).

Mistake

Compute Optimizer provides real-time recommendations.

Correct

Recommendations are updated daily, not in real-time. There is a minimum data collection period of 14 days for EC2/EBS and 7 days for Lambda before any recommendations appear.

Mistake

Compute Optimizer is a paid service for all resource types.

Correct

Compute Optimizer is free for EC2 instances, Auto Scaling groups, and Lambda functions. There is a charge only for EBS volume recommendations.

Do You Actually Know This?

Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.

Frequently Asked Questions

How long does it take for AWS Compute Optimizer to generate recommendations after enabling it?

Compute Optimizer requires at least 14 days of CloudWatch metrics for EC2 and EBS, and 7 days for Lambda functions. During this period, the status shows 'Insufficient Data'. After the minimum period, recommendations are generated and updated daily. So you can expect initial recommendations after about two weeks for EC2.

Does AWS Compute Optimizer automatically apply its recommendations?

No, Compute Optimizer does not automatically apply any changes. It only provides recommendations. You must manually implement them, for example by resizing an EC2 instance (if the instance type supports resize) or modifying an Auto Scaling group's launch configuration. You can also use AWS Systems Manager Automation to create custom runbooks that apply recommendations.

What metrics does AWS Compute Optimizer use for EC2 recommendations?

Compute Optimizer uses CloudWatch metrics including CPU utilization, network throughput (in/out), and disk read/write operations. Memory utilization is only used if you have installed and configured the CloudWatch agent to report memory metrics. Without the agent, memory-based recommendations are not possible.

Is AWS Compute Optimizer free?

Compute Optimizer is free for EC2 instances, Auto Scaling groups, and Lambda functions. However, there is a charge for analyzing EBS volumes. The pricing for EBS analysis is per volume per month. Check the AWS Compute Optimizer pricing page for current rates.

How does Compute Optimizer differ from AWS Trusted Advisor for cost optimization?

Trusted Advisor provides high-level cost optimization checks using static rules (e.g., CPU < 10% for 14 days) and covers many services. Compute Optimizer uses machine learning to give detailed rightsizing recommendations (specific instance type/size) with performance risk ratings. Compute Optimizer is more focused on compute resources and provides actionable, data-driven recommendations.

Can Compute Optimizer recommend instance family changes?

Yes, Compute Optimizer can recommend changing to a different instance family if it better matches your workload. For example, it might recommend moving from a general-purpose m5 to a compute-optimized c5 if your workload is CPU-intensive. However, it respects constraints such as required features (e.g., EBS optimization, enhanced networking) and will not recommend a family that lacks those features.

What happens if I have less than 14 days of data for an EC2 instance?

If there is insufficient data (less than 14 days), Compute Optimizer will show the status as 'Insufficient Data' for that instance and will not generate recommendations. You must wait until enough data accumulates. For new instances, you may need to wait up to 14 days.

Terms Worth Knowing

Ready to put this to the test?

You've just covered AWS Compute Optimizer — now see how well it sticks with free SAA-C03 practice questions. Full explanations included, no account needed.

Done with this chapter?