Getting started with AWS Compute Optimizer
When you access the AWS Compute Optimizer console for the first time, you are asked to opt in, using the account that you’re signed in with, before you can use the service. You can also opt in, and opt out using the Compute Optimizer API, AWS Command Line Interface (AWS CLI), or SDKs.
By opting in, you are authorizing Compute Optimizer to analyze the specifications and utilization metrics of your AWS resources, such as EC2 instances and Auto Scaling groups.
Accounts supported by Compute Optimizer
The following AWS account types can opt in to Compute Optimizer:
-
Standalone AWS account - A standalone AWS account that does not have AWS Organizations enabled. If you opt in to Compute Optimizer while signed in to a standalone account, the service analyzes resources that are in the account, and generates optimization recommendations for those resources.
-
Member account of an organization - An AWS account that is a member of an organization. If you opt in to Compute Optimizer while signed in to a member account of an organization, the service analyzes resources that are in the member account only, and generates optimization recommendations for those resources.
-
Management account of an organization - An AWS account that administers an organization. If you opt in to Compute Optimizer while signed in to a management account of an organization, the service gives you the option to opt in only the management account, or the management account and all member accounts of the organization.
Important To successfully opt in all member accounts of an organization, the organization must have all features enabled. For more information, see Enabling All Features in Your Organization in the AWS Organizations User Guide.
Trusted access for Compute Optimizer is automatically enabled in your organization account when you opt in using your organization's management account and include all member accounts within the organization. For more information, see Compute Optimizer and AWS Organizations trusted access.
Required permissions
You must have the appropriate permissions to opt in to Compute Optimizer, to view its recommendations, and to opt out. For more information, see Controlling access with AWS Identity and Access Management.
When you opt in, Compute Optimizer automatically creates a Service-Linked Role in your account to access its data. For more information, see Using Service-Linked Roles for AWS Compute Optimizer.
Opting in your account
Use the following procedure to opt in your account using the Compute Optimizer console or the AWS CLI.
If your account is already opted in but you want to opt in again to re-enable trusted
access for Compute Optimizer in your organization, then you must use the AWS CLI to opt in. Specify the
--include-member-accounts parameter when opting in with the
update-enrollment-status command. You can also enable trusted access using
the AWS Organizations console, its AWS CLI, or API. For more information, see Using AWS Organizations with other AWS
services in the AWS Organizations User Guide.
To improve the recommendation quality of Compute Optimizer, AWS may use your CloudWatch metrics and
configuration data. This includes up to three months (93 days) of metrics analysis when you
activate the enhanced infrastructure metrics feature. Contact AWS Support
Consider the following after opting in:
-
After you opt in, findings and optimization recommendations can take up to 12 hours to be generated. Sufficient metric data must also be accumulated. For more information, see CloudWatch metric requirements.
-
Findings and recommendations are displayed in the dashboard and recommendation pages of the Compute Optimizer console. For more information, see Viewing the AWS Compute Optimizer dashboard and Viewing resource recommendations.
-
Activate recommendation preferences, such as the enhanced infrastructure metrics paid feature. It extends the metrics analysis look-back period for EC2 instances, including instances in Auto Scaling groups, up to three months (compared to the 14-day default). For more information, see Activating recommendation preferences.
Opting out your account
Use the following procedure to opt out your account from Compute Optimizer using the AWS CLI, and delete your account's recommendations and related metrics data from Compute Optimizer. For more information, see update-enrollment-status in the AWS CLI Command Reference. You cannot opt out using the Compute Optimizer console.
To opt out an account
-
Open a Terminal or Command Prompt window.
If you haven't already, install the AWS CLI and configure it to work with Compute Optimizer. For more information, see Installing the AWS CLI and Quickly Configuring the AWS CLI in the AWS Command Line Interface User Guide.
-
Enter the following command.
aws compute-optimizer update-enrollment-status --status InactiveNote You cannot specify the
--include-member-accountsparameter when opting out with theupdate-enrollment-statuscommand; you will receive an error message
Your account is opted out of Compute Optimizer after running the previous command, and your account's recommendations and related metrics data will be deleted from Compute Optimizer. If you access the Compute Optimizer console, you should see the option to opt in again.

