Code360 powered by Coding Ninjas X Code360 powered by Coding Ninjas X
Table of contents
Supported resources and requirements
CloudWatch metric requirements
Amazon EC2 instance requirements
Auto Scaling group requirements
Amazon EBS volume requirements
Lambda function requirements
Getting started with AWS Compute Optimizer
Controlling access
Using Service-Linked Roles
AWS managed policies
Amazon S3 bucket policy
Metrics analyzed 
Frequently Asked Questions
What is AWS compute Optimizer?
What is Compute Optimized?
What is the fastest AWS instance?
What is an E2C in AWS?
Last Updated: Mar 27, 2024

AWS Compute Optimizer

Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM


Welcome readers! In this blog, we will learn about AWS Compute Optimizer, a service that examines your AWS resources' configuration and utilization information. It determines whether your resources are optimal and generates optimization recommendations to lower costs and increase workload performance. Compute Optimizer also shows graphs of recent usage metric history data as well as anticipated utilization for recommendations, which you may use to determine which recommendation offers the best price-performance trade-off. The study and visualization of your usage patterns can assist you in determining when to transfer or shrink your running resources while still meeting your performance and capacity goals.

Supported resources and requirements

AWS Compute Optimizer recommends the following resources:

  • Amazon Elastic Compute Cloud (Amazon EC2) instances
  • Amazon EC2 Auto Scaling groups
  • Amazon Elastic Block Store (Amazon EBS) volumes
  • AWS Lambda functions

The resources must meet the following Amazon CloudWatch metric and resource-specific requirements for receiving recommendations.

CloudWatch metric requirements

Compute Optimizer requires at least 30 hours of CloudWatch metric data from your resource to provide recommendations.

Allow extra time for the recommendations to appear in the Compute Optimizer console if your resources don't currently have adequate metric data.

Amazon EC2 instance requirements

Compute Optimizer makes suggestions for a variety of instance kinds. Although you can run unsupported instance types alongside supported ones, Compute Optimizer will only make suggestions for supported instances. Not all instance types are available in every AWS Region where Compute Optimizer is accessible. See Finding an Amazon EC2 instance type in the Amazon EC2 User Guide for Linux Instances for a list of supported Regions for each of these instance kinds.

Auto Scaling group requirements

For Auto Scaling groups that run supported instance types, Compute Optimizer generates suggestions. The supported instance types are listed in the preceding Amazon EC2 instance requirements section.

Additionally, the Auto Scaling groups must meet the following requirements:

  • Configured to run a single instance type (no mixed instance types)
  • Same values for desired, minimum, and maximum capacity (for example, an Auto Scaling group with a fixed number of instances).
  • No scaling policy attached.
  • No overrides configured

Compute Optimizer generates recommendations for instances in Auto Scaling groups that meet all of these configuration requirements.

Amazon EBS volume requirements

Compute Optimizer offers suggestions for EBS volume types associated to an instance that are General Purpose SSD (gp2 and gp3) and Provisioned IOPS SSD (io1 and io2). The above-described volume types also provide recommendations from General Purpose SSD (gp2) volumes to General Purpose SSD (gp3) volumes.

When a volume is linked to an instance, data is only reported to CloudWatch. To achieve the metric data requirement specified previously in this article, the volume must be linked to an instance for at least 30 hours.

Lambda function requirements

Compute Optimizer generates memory size recommendations only for Lambda functions that meet the following requirements:

  • Configured memory is less than or equal to 1,792 MB
  • Functions are invoked at least 50 times in the last 14 days

Functions that don't meet these requirements are given a finding of Unavailable. The reason code of Inconclusive applies to functions that have configured memory greater than 1,792 MB. Insufficient data applies to functions that have been invoked less than 50 times in the last 14 days.

Functions with a finding of Unavailable don't appear in the Compute Optimizer console and don't receive recommendations.

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job

Getting started with AWS Compute Optimizer

Before you can use the AWS Compute Optimizer dashboard for the first time, you must first opt in with the account you're currently signed in with. You can also use the Compute Optimizer API, AWS Command Line Interface (AWS CLI), or SDKs to opt in and out.

By allowing Compute Optimizer to evaluate the specifications and utilization metrics of your AWS resources, such as EC2 instances and Auto Scaling groups, you give Compute Optimizer permission to do so.

Controlling access

Create identities (users, groups, or roles) using AWS Identity and Use Management (IAM), and then provide those identities authorization to access the AWS Compute Optimizer console and APIs.

IAM users do not have access to the Compute Optimizer console or APIs by default. IAM policies are used to grant access to a single user, a group of users, or a role.

You can assign individual passwords to IAM users once they've been created. Then, using an account-specific sign-in page, they may log in to your account and view Compute Optimizer information.

Using Service-Linked Roles

AWS Compute Optimizer takes advantage of service-linked roles from AWS Identity and Access Management (IAM). A service-connected role is a special kind of IAM position that is directly related to Compute Optimizer. Compute Optimizer pre-defines service-linked roles, which include all of the permissions required by the service to call other AWS services on your behalf.

Because you don't have to manually provide the appropriate permissions with a service-linked role, it's easier to set up Compute Optimizer. Compute Optimizer determines the permissions of its service-linked roles, and only Compute Optimizer can assume them unless otherwise specified. The trust policy and the permissions policy are defined permissions, and the permissions policy cannot be coupled with any other IAM entity.

AWS managed policies

It's easier to use AWS managed policies to add permissions to users, groups, and roles than it is to develop policies yourself. Creating IAM customer controlled policies that provide your team only the permissions they need takes time and expertise. You may utilize our AWS managed policies to get started quickly. These policies are available in your AWS account and address common usage situations. See AWS managed policies in the IAM User Guide for additional information on AWS managed policies.

AWS managed policies are maintained and updated by AWS services. Permissions in AWS managed policies cannot be changed. To accommodate new features, services occasionally add additional permissions to an AWS managed policy. This type of change has an impact on all identities (users, groups, and roles) associated with the policy. When a new feature is released, or new operations become available, services are most likely to update an AWS managed policy. AWS managed policies do not delete permissions; therefore, policy upgrades will not break your existing permissions.

AWS also provides managed policies for job functions that span several services. The AWS managed policy ReadOnlyAccess, for example, grants read-only access to all AWS services and resources. AWS adds read-only permissions for new activities and resources when a service introduces new functionality.

Amazon S3 bucket policy

You can save your Compute Optimizer recommendations and information to an Amazon Simple Storage Service (Amazon S3) bucket as a comma-separated values (.csv) file and a JavaScript Object Notation (.json) file.

Before you create the export job, you must first build the target S3 bucket for your suggestions export. The S3 bucket is not created by Compute Optimizer. The S3 bucket you choose for your recommendations export files can't be made public, and it can't be set up as a Requester Pays bucket.

As a best practice, create a dedicated S3 bucket for Compute Optimizer export files.

Metrics analyzed 

If you activate the improved infrastructure metrics recommendation preference, AWS Compute Optimizer begins examining the specs (vCPUs, RAM, storage, and so on) and CloudWatch metrics of your running resources from the last 14 days or longer after you opt in. To create recommendations, Compute Optimizer requires at least 30 hours of continuous metrics data from your resource. Compute Optimizer provides its findings on the dashboard page when the analysis is completed, which can take up to 12 hours.

Frequently Asked Questions

What is AWS compute Optimizer?

AWS Compute Optimizer is a service that examines your AWS resources' configuration and utilization information.

What is Compute Optimized?

Simply defined, compute optimized means it's better suited for workloads that require more CPU but not as much memory, whereas memory optimized means it's better suitable for workloads that require a lot of memory but not as much CPU (database).

What is the fastest AWS instance?

Amazon EC2 M5zn instances at AWS re: Invent 2020, which employ second-generation Intel Xeon Scalable (Cascade Lake) processors with an all-core turbo clock frequency of up to 4.5 GHz, making them the fastest cloud instance available.

What is an E2C in AWS?

In the Amazon Web Services (AWS) Cloud, Amazon Elastic Compute Cloud (Amazon EC2) provides scalable computing power. Using Amazon EC2 reduces the requirement for upfront hardware investment, allowing you to develop and deploy apps more quickly.


In this article, we have extensively discussed AWS Compute Optimizer, a service that analyzes the configuration and utilisation metrics of your AWS resources.

We hope that this blog has helped you enhance your knowledge regarding AWS Compute Optimizer. Do upvote our blog to help other ninjas grow.

After reading about the AWS Compute Optimizer, are you not feeling excited to read/explore more articles on this topic? Don't worry; Coding Ninjas has you covered. To learn, see Operating SystemUnix File SystemFile System Routingand File Input/Output.

Refer to our Guided Path on Coding Ninjas Studio to upskill yourself in Data Structures and AlgorithmsCompetitive ProgrammingJavaScriptSystem Design, and many more! If you want to test your competency in coding, you may check out the mock test series and participate in the contests hosted on Coding Ninjas Studio! But if you have just started your learning process and are looking for questions asked by tech giants like Amazon, Microsoft, Uber, etc; you must look at the problems, interview experiences, and interview bundle for placement preparations.

Nevertheless, you may consider our paid courses to give your career an edge over others!

Happy Learning!

Live masterclass