This chapter covers AWS Cost Explorer Rightsizing Recommendations, a feature that helps you optimize EC2 instance costs by identifying underutilized instances and suggesting instance type changes or purchase commitments. For the SOA-C02 exam, this topic falls under Domain 6: Cost Management, Objective 6.2: Implement cost optimization strategies. Expect approximately 5-8% of exam questions to cover cost optimization tools, with Rightsizing Recommendations being a key sub-topic. Understanding how recommendations are generated, how to interpret them, and how to apply them is critical for the exam and for real-world cost management.
Jump to a section
Imagine you are a company that buys office supplies every month. You have a personal shopper who reviews your past purchases: you bought 500 reams of paper at $10 each from Vendor A, 200 ink cartridges at $30 each from Vendor B, and 50 desk chairs at $200 each from Vendor C. The shopper then analyzes your usage: you used only 300 reams of paper, so you over-provisioned; the ink cartridges lasted twice as long as expected, so you could buy fewer; the chairs are used 24/7, so you could switch to a heavier-duty model. The shopper then recommends: downgrade to a smaller paper package (save $2,000), switch to a subscription model for ink (save $1,500), and upgrade to a different chair model that costs less per month (save $2,500). The shopper also notes that Vendor B offers a bulk discount if you commit to 12 months, saving an additional $800. The shopper does not force you to change; they just present the options with estimated savings. In AWS Cost Explorer, Rightsizing Recommendations work exactly this way: they analyze your EC2 instance usage over the past 14 or 30 days, identify underutilized instances (like over-provisioned paper), suggest instance type changes (like downgrading), and quantify the potential savings. They also consider Reserved Instances and Savings Plans to recommend purchase commitments. The key is that the recommendations are based on actual historical usage, not guesses, and they are presented as actionable suggestions you can implement with one click.
What Are Cost Explorer Rightsizing Recommendations?
AWS Cost Explorer Rightsizing Recommendations is a feature within AWS Cost Explorer that uses machine learning to analyze your Amazon EC2 instance usage and provide actionable recommendations to reduce costs. It identifies instances that are over-provisioned (e.g., m5.large when t3.medium would suffice) and suggests downsizing or changing instance families. It also recommends purchasing Reserved Instances (RIs) or Savings Plans based on consistent usage patterns.
Why It Exists
EC2 instances are a major cost driver for most AWS accounts. Rightsizing Recommendations help you avoid paying for unused or underutilized capacity. The feature is free to use (standard Cost Explorer charges apply for data), and it provides a centralized view of optimization opportunities across all regions and accounts (if you use AWS Organizations).
How It Works Internally
The recommendation engine works in three phases:
Data Collection: Cost Explorer ingests CloudWatch metrics (CPU, memory, network I/O) and billing data for each EC2 instance over a lookback period (default 14 days, configurable to 30 days). It also considers the instance's lifecycle (On-Demand, Spot, Reserved).
Analysis: The engine uses percentile-based analysis to determine the instance's peak utilization. By default, it uses the 99th percentile of CPU utilization, meaning it considers the highest 1% of usage to avoid recommending downsizing that would cause performance issues during spikes. Memory utilization is also considered if CloudWatch detailed monitoring is enabled (1-minute metrics). The engine then maps the instance's requirements to a set of alternative instance types that can meet the same workload.
Recommendation Generation: For each underutilized instance, the engine suggests one or more instance types that are cheaper and have sufficient capacity. It calculates the potential savings (On-Demand cost difference) and also recommends purchase commitments (RIs or Savings Plans) if the instance runs consistently enough (typically > 70% of the time).
Key Components, Values, and Defaults
Lookback Period: 14 days (default) or 30 days. Longer lookback captures more usage patterns but delays recommendations.
Percentile Threshold: 99th percentile for CPU by default. This is a safety margin to avoid downsizing too aggressively.
Minimum Savings Threshold: Recommendations are only shown if the estimated monthly savings exceed $10 (default). This filter can be adjusted.
Instance Families: Recommendations may suggest moving to a different instance family (e.g., from M5 to T3) or within the same family (e.g., from m5.large to m5.xlarge if you need more resources).
Purchase Recommendations: Separate from rightsizing, Cost Explorer also recommends RIs and Savings Plans based on consistent usage. These are shown in the same console.
Configuration and Verification
To access Rightsizing Recommendations:
Open the AWS Cost Explorer console.
In the left navigation pane, choose Rightsizing Recommendations.
You can filter by account, region, or instance type.
View the list of recommendations with estimated savings.
To apply a recommendation, select the instance and choose Modify (this opens the EC2 console to change the instance type).
You can also use the AWS CLI:
aws ce get-rightsizing-recommendation --service EC2 --time-period Start=2023-01-01,End=2023-01-15 --configuration LookbackPeriodInDays=30This returns a JSON object with recommendations. The key fields:
- RightsizingRecommendationList: array of recommendations.
- RecommendationDetails: includes current instance type, recommended instance type, and savings.
- SavingsOpportunity: total savings.
How It Interacts with Related Technologies
AWS Compute Optimizer: Similar but more advanced; uses machine learning and provides recommendations for EC2, Auto Scaling groups, EBS volumes, and Lambda functions. Compute Optimizer requires a premium subscription (or is free if you enable enhanced infrastructure metrics). Rightsizing Recommendations in Cost Explorer is simpler and free.
Reserved Instances and Savings Plans: Rightsizing Recommendations often include purchase recommendations. For example, if an instance runs 24/7, the recommendation may suggest buying a 1-year or 3-year Standard RI. The savings calculation combines rightsizing and purchase discounts.
AWS Organizations: If you use AWS Organizations, you can view recommendations across all accounts in the management account. This helps identify cross-account optimization opportunities.
Limitations
Memory Utilization: Only considered if detailed monitoring (1-minute metrics) is enabled. Without it, the engine may underestimate memory requirements.
Not Real-Time: Recommendations are updated daily (data latency up to 24 hours).
No GPU Recommendations: Does not cover GPU-based instances (e.g., P3, G4) for rightsizing.
Only EC2: Does not cover RDS, ElastiCache, or other services. Use Compute Optimizer for broader coverage.
Exam-Relevant Details
The default lookback period is 14 days.
The default percentile is 99th for CPU.
Minimum savings threshold is $10 per month.
Recommendations are available for EC2 instances only.
You can filter by account, region, and instance type.
The feature is accessed via Cost Explorer console or AWS CLI.
Rightsizing Recommendations integrate with EC2 Fleet and Auto Scaling groups but do not automatically apply changes.
Step-by-Step Recommendation Generation
Data Ingestion: Cost Explorer collects CloudWatch metrics for each EC2 instance over the lookback period.
Utilization Calculation: For each instance, the engine calculates the 99th percentile CPU utilization and, if available, memory utilization.
Instance Mapping: The engine maps the current instance's vCPU and memory to alternative instance types that can handle the same load.
Cost Comparison: It computes the On-Demand cost of the current instance vs. the recommended instance over the lookback period.
Savings Calculation: The difference is annualized to estimate monthly savings.
Filtering: Recommendations with savings below $10/month are excluded.
Presentation: The results are displayed in the console with options to sort by savings.
Common CLI Commands
# Get recommendations with 14-day lookback
aws ce get-rightsizing-recommendation --service EC2 --time-period Start=2023-06-01,End=2023-06-15
# Get recommendations with 30-day lookback and show only instances with savings > $50
aws ce get-rightsizing-recommendation --service EC2 --time-period Start=2023-05-16,End=2023-06-15 --configuration LookbackPeriodInDays=30 --filter '{"Dimensions":{"Key":"INSTANCE_TYPE","Values":["t2.*"]}}'Note: The --filter parameter uses JSON syntax. You can filter by region, account, or instance type.
Integration with AWS Budgets
You can create a budget that alerts you when rightsizing savings exceed a certain threshold. For example, create a budget with a cost target of $0 and use a filter for the RightsizingRecommendation cost category. This is not commonly tested but is useful in production.
Exam Traps
Trap: Candidates think Rightsizing Recommendations automatically resize instances. Reality: They only provide recommendations; you must manually apply them.
Trap: Candidates assume memory is always considered. Reality: Memory is only considered if detailed monitoring is enabled (1-minute metrics). Without it, the recommendation may be based only on CPU.
Trap: Candidates confuse Cost Explorer Rightsizing Recommendations with AWS Compute Optimizer. Know that Compute Optimizer is a separate service with more features and a different pricing model.
Trap: Candidates think the lookback period is 7 days. Default is 14, configurable to 30.
Trap: Candidates assume recommendations are real-time. They are updated daily.
Summary
Cost Explorer Rightsizing Recommendations is a free, easy-to-use tool for EC2 cost optimization. It analyzes historical usage, suggests instance type changes, and quantifies savings. For the exam, remember the default settings, the fact that it only covers EC2, and that it does not automatically apply changes. Use it in conjunction with Compute Optimizer for a more comprehensive optimization strategy.
Enable Detailed Monitoring on EC2
Detailed monitoring (1-minute CloudWatch metrics) is required for memory utilization to be considered in rightsizing recommendations. Without it, only CPU utilization is used. Enable it via the EC2 console or AWS CLI: `aws ec2 monitor-instances --instance-ids i-1234567890abcdef0`. This incurs additional CloudWatch costs ($3.50 per instance per month). For the exam, know that detailed monitoring is optional but improves recommendation accuracy.
Navigate to Cost Explorer
Open the AWS Management Console and go to the Cost Explorer service. In the left navigation pane, click on 'Rightsizing Recommendations'. This page displays a dashboard with a summary of potential savings and a list of recommendations. You can filter by account, region, instance type, and lookback period (14 or 30 days). The default view shows recommendations for all EC2 instances in the current account.
Review Recommendations
Each recommendation includes: current instance type, recommended instance type, estimated monthly savings, and a confidence rating (e.g., 'High', 'Medium', 'Low'). The confidence is based on how well the recommended instance matches the workload. Click on a recommendation to see detailed metrics: CPU utilization, memory utilization (if available), and network throughput. The console also shows the 99th percentile utilization for the current instance.
Apply the Recommendation
To apply a recommendation, select the instance and click 'Modify'. This opens the EC2 console's 'Change Instance Type' dialog. You must stop the instance first (if it's an EBS-backed instance, you can start it again after). For instances in an Auto Scaling group, you need to update the launch configuration or template. The exam tests that you must manually apply changes; no automatic application exists.
Monitor for Savings
After applying changes, monitor your cost and usage reports to verify savings. Use Cost Explorer's 'Monthly Costs by Service' to see if EC2 costs decrease. You can also set up a budget with a filter for 'Rightsizing Recommendation' to alert you when savings exceed a threshold. The exam may ask about verifying savings using Cost Explorer dashboards.
Enterprise Scenario 1: Large E-commerce Platform
A company runs 500 EC2 instances across multiple accounts for its e-commerce platform. They use Auto Scaling groups for web and application tiers. Over time, developers provisioned instances with large instance types (e.g., m5.xlarge) to handle peak traffic, but baseline usage is much lower. The cloud team uses Cost Explorer Rightsizing Recommendations to identify 200 instances that can be downsized to m5.large, saving $15,000 per month. They also find that 50 instances running 24/7 are good candidates for Standard RIs, saving an additional $8,000 per month. The team applies changes during maintenance windows and uses AWS Config to track instance type changes.
Enterprise Scenario 2: SaaS Provider with Variable Workloads
A SaaS provider runs a mix of On-Demand and Spot instances for batch processing. Their usage patterns are spiky. Rightsizing Recommendations suggest moving some On-Demand instances to T3 burstable instances, which are cheaper for low-CPU workloads. However, the team must be careful because T3 instances have CPU credits; if the workload bursts frequently, performance may degrade. The team uses the 'Low' confidence recommendations as cautionary and tests with a few instances before rolling out. They also use Savings Plans for baseline usage, which Rightsizing Recommendations also highlights.
Common Pitfalls
Ignoring Memory: Without detailed monitoring, memory utilization is not considered. A recommendation might suggest downsizing an instance that is memory-bound, causing performance issues.
Blindly Applying Recommendations: Some recommendations may suggest moving to a different instance family (e.g., from M5 to T3) that has different performance characteristics (e.g., burstable vs. dedicated). Always test with a representative workload.
Not Considering Reserved Instances: Rightsizing Recommendations include purchase recommendations, but teams often overlook them. Combining rightsizing with RIs can double savings.
Overlooking Auto Scaling Groups: Recommendations for instances in Auto Scaling groups require updating the launch template or configuration. The exam may test that you cannot directly modify an instance in an Auto Scaling group without updating the group's configuration.
Performance Considerations
Rightsizing Recommendations are updated daily, so there is a delay between usage changes and recommendations.
For very large accounts (thousands of instances), the console may take longer to load. Use the AWS CLI for programmatic access.
The savings calculation assumes On-Demand pricing. If you already have RIs or Savings Plans, the actual savings may be lower.
What the SOA-C02 Exam Tests
Objective 6.2: Implement cost optimization strategies. You need to know how to use Cost Explorer Rightsizing Recommendations to identify underutilized EC2 instances and apply changes.
Specific Actions: Enable detailed monitoring, review recommendations, apply changes manually, and verify savings.
Integration: How Rightsizing Recommendations relate to Compute Optimizer, Reserved Instances, and Savings Plans.
Common Wrong Answers
'Rightsizing Recommendations automatically resize instances.' This is false. Recommendations are only suggestions; you must manually modify the instance or update Auto Scaling group configurations.
'Memory utilization is always considered.' False. Memory is only considered if detailed monitoring (1-minute metrics) is enabled. Without it, only CPU is used.
'The default lookback period is 7 days.' False. The default is 14 days; it can be changed to 30 days.
'Recommendations are real-time.' False. They are updated daily.
Exam Numbers and Terms
14 days: Default lookback period.
99th percentile: Default CPU utilization threshold.
$10: Minimum monthly savings threshold for recommendations.
EC2 only: Rightsizing Recommendations only cover EC2 instances (not RDS, ElastiCache, etc.).
CLI command: aws ce get-rightsizing-recommendation --service EC2.
Edge Cases
Instances with tags: Recommendations can be filtered by tags. The exam may ask about filtering by cost allocation tags.
Multiple accounts: In AWS Organizations, the management account can view recommendations for all member accounts.
Spot Instances: Recommendations for Spot instances are available but less common because Spot pricing is already low. The engine may still suggest rightsizing if the instance type is over-provisioned.
How to Eliminate Wrong Answers
If an answer says 'automatically' or 'applies changes', it is likely wrong.
If an answer mentions 'real-time', it is wrong.
If an answer says 'includes RDS' or 'Lambda', it is wrong (only EC2).
If an answer says '7-day lookback', it is wrong (14 or 30).
Exam Tips
Remember that Rightsizing Recommendations are part of Cost Explorer, not a separate service.
Know that you can use the AWS CLI to retrieve recommendations programmatically.
Understand that the savings shown are estimates based on On-Demand pricing; actual savings may vary if you have RIs or Savings Plans.
Practice navigating the console in your own AWS account (free tier eligible).
Rightsizing Recommendations are accessed via Cost Explorer console or CLI (`aws ce get-rightsizing-recommendation`).
Default lookback period is 14 days; can be changed to 30 days.
Default CPU percentile is 99th; memory only considered if detailed monitoring enabled.
Minimum savings threshold is $10 per month.
Recommendations are for EC2 instances only; not for RDS, ElastiCache, etc.
Recommendations are suggestions only; you must manually apply changes.
Combine rightsizing with Reserved Instances or Savings Plans for maximum savings.
Use the AWS CLI to programmatically retrieve recommendations for automation.
In AWS Organizations, the management account can view recommendations for all member accounts.
Rightsizing Recommendations are updated daily, not real-time.
These come up on the exam all the time. Here's how to tell them apart.
Cost Explorer Rightsizing Recommendations
Free to use (Cost Explorer charges apply for data access).
Only covers EC2 instances.
Uses 99th percentile CPU by default; memory only with detailed monitoring.
Recommendations updated daily.
Provides simple instance type change and purchase recommendations.
AWS Compute Optimizer
Free with enhanced infrastructure metrics (otherwise premium).
Covers EC2, Auto Scaling groups, EBS volumes, and Lambda functions.
Uses machine learning with more granular metrics (CPU, memory, network, and disk).
Recommendations updated every 24 hours (similar).
Provides more detailed recommendations, including GPU and custom instance types.
Mistake
Rightsizing Recommendations automatically change instance types.
Correct
They are only recommendations. You must manually modify the instance via the EC2 console or CLI. The exam tests that you understand this distinction.
Mistake
Memory utilization is always included in recommendations.
Correct
Memory is only considered if detailed monitoring (1-minute metrics) is enabled on the instance. Without it, only CPU utilization is analyzed.
Mistake
The default lookback period is 7 days.
Correct
The default is 14 days. You can configure it to 30 days, but 7 is not an option.
Mistake
Rightsizing Recommendations cover all AWS services.
Correct
They only cover EC2 instances. For other services, use AWS Compute Optimizer or Trusted Advisor.
Mistake
Recommendations are updated in real-time.
Correct
Recommendations are updated daily based on the previous day's data. There is up to 24 hours of latency.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
Enable detailed monitoring on the EC2 instance. This can be done via the EC2 console (Monitoring tab) or CLI: `aws ec2 monitor-instances --instance-ids i-1234567890abcdef0`. Detailed monitoring provides 1-minute CloudWatch metrics, which Cost Explorer uses to analyze memory. Note that this incurs additional charges ($3.50 per instance per month). Without detailed monitoring, only CPU utilization is considered.
No. They are only recommendations. You must manually modify the instance type via the EC2 console or CLI. For instances in Auto Scaling groups, you need to update the launch configuration or template. The exam often tests this distinction to see if you understand that no automatic action is taken.
The default lookback period is 14 days. You can change it to 30 days when generating recommendations. The lookback period determines the historical data used for analysis. A longer period captures more usage patterns but delays recommendations. The exam expects you to know the default is 14 days.
In the Cost Explorer console, on the Rightsizing Recommendations page, you can use the filter options to select specific accounts (if using AWS Organizations) or regions. You can also use the AWS CLI with the `--filter` parameter, e.g., `--filter '{"Dimensions":{"Key":"REGION","Values":["us-east-1"]}}'`.
Cost Explorer Rightsizing Recommendations is free (with standard Cost Explorer charges) and only covers EC2 instances. It uses a simple percentile-based analysis. AWS Compute Optimizer is a separate service that uses machine learning, covers EC2, Auto Scaling, EBS, and Lambda, and can be free with enhanced infrastructure metrics or premium otherwise. Compute Optimizer provides more detailed recommendations.
Low confidence recommendations indicate that the recommended instance type may not be a perfect fit for the workload. This could be due to insufficient data (e.g., short lookback period) or variable usage patterns. AWS suggests testing low confidence recommendations on a small number of instances before broad deployment.
Yes, but you cannot directly modify an instance in an Auto Scaling group. You must update the launch configuration or launch template to change the instance type for future instances. Existing instances will need to be replaced (e.g., by terminating them and letting Auto Scaling launch new ones). The exam may test this process.
You've just covered Cost Explorer Rightsizing Recommendations — now see how well it sticks with free SOA-C02 practice questions. Full explanations included, no account needed.
Done with this chapter?