Tip

When to use AWS Compute Optimizer vs. Cost Explorer

AWS Compute Optimizer and Cost Explorer monitor, analyze and optimize your cloud costs. Compare the two tools to choose which is best for VM rightsizing.

Application owners know that cost management for cloud resources is challenging.

AWS has several tools that help with monitoring, analyzing and optimizing the cost of cloud resources. Two popular options that provide rightsizing recommendations are AWS Compute Optimizer and AWS Cost Explorer.

Explore when to use each tool and which is the right one for your rightsizing needs.

AWS Compute Optimizer features

AWS Compute Optimizer is a service that analyzes Amazon CloudWatch metrics and provides EC2 instance recommendations. It flags instances that it considers to have an optimal resource allocation and provides a list of alternative EC2 instance types for each recommendation, as well as projected cost and expected savings for each option.

For example, it provides the expected CPU utilization percentage for each recommendation, compared to CPU utilization for the current instance type. The interface includes graphs for various relevant metrics, such as memory, network in, network out, network packets, Elastic Block Store (EBS) read/write operations and bandwidth, among others.

Screenshot of current instance type with recommendation.
Figure 1. An example of recommendations for a deployed t3.medium EC2 instance.

Additionally, it applies AI and machine learning algorithms to find potential optimizations for EC2 instances, Auto Scaling groups, Amazon EBS volumes and AWS Lambda functions. It displays the resources that it identifies as running optimally and the ones for which it recommends optimizations.

AWS Cost Explorer features

AWS Cost Explorer helps users understand where money is spent in an AWS account or organization. The graphical interface visualizes incurred costs for current and past billing cycles. It shows daily and hourly costs, plus it forecasts future costs and usage. Users can use several variables to filter cost, such as AWS services, accounts, regions, tags, usage types and resources. Figure 2 shows what the main interface looks like in a test account.

Screenshot of a pricing chart in AWS Cost Explorer.
Figure 2. Main interface chart in a test account.

Cost Explorer is powered by AWS Compute Optimizer, but the user interface is slightly different. It provides the option to find idle instances, as well as Reserved Instances and Savings Plans recommendations. These options are not available in the Compute Optimizer user interface.

The main interface displays a chart, which provides a quick way to understand cost and to identify any anomalies. This mechanism gives application owners a clear view of where money is spent and allows them to identify specific usage types or resources that contribute to high costs. It also has more granular capabilities, such as displaying hourly data, which helps identify specific usage patterns or situations resulting in high costs that take place within a specific time frame.

When to use AWS Compute Optimizer vs. Cost Explorer

Both services are useful tools for finding AWS cost optimization opportunities. While Cost Explorer provides a view for all usage types at the account and AWS organization level, AWS Compute Optimizer is more specific to compute resources, such as EC2 instances, Auto Scaling groups, Elastic Block Store (EBS) volumes and Lambda functions. If the top contributors to cost are not related to any of these services, then AWS Compute Optimizer becomes less relevant.

Also, both AWS Compute Optimizer and Cost Explorer provide an API and CLI. This allows developers to programmatically access cost data and recommendations. An admin user must enable AWS Compute Optimizer before they can access recommendations. Only relevant users have permissions to access billing information.

For users to access Cost Explorer, the root user must enable the IAM User and Role Access to Billing Information setting in the Billing and Cost Management console. Otherwise, access will be denied to nonroot users. Once the user enables access, users will potentially be able to view information related to payment methods, billing, tax addresses and invoice history.

Start your cost optimization analysis in Cost Explorer, which will provide data across all usage types. If compute resources are top contributors to the AWS bill, then the rightsizing recommendations feature is a good place to start. The next step is to use AWS Compute Optimizer for a more detailed view of compute recommendations and to apply updates to applicable AWS components.

Screenshot of rightsizing recommendations.
Figure 3. Recommended parameters for your rightsizing.

Next Steps

Best practices for rightsizing EC2 instances

Dig Deeper on Cloud provider platforms and tools