Getting started with AWS Compute Optimizer - AWS Compute Optimizer

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.

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.

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.

Opting in your account

Use the following procedure to opt in your account using the Compute Optimizer console or the AWS CLI.

Note

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.

Console
  1. Open the Compute Optimizer console at https://console.aws.amazon.com/compute-optimizer/.

    If this is your first time using the Compute Optimizer console, the Compute Optimizer landing page is displayed.

  2. Choose Get started.

  3. On the Account setup page, review the Getting started and Setting up your account sections.

  4. The following options are displayed if the account that you're signed in to is a management account of an organization. Choose one before continuing to the next step.

    • Only this account - Choose this option to opt in only the account that you’re currently signed in to. If you choose this option, Compute Optimizer analyzes resources that are in the individual account, and generates optimization recommendations for those resources.

    • All accounts within this organization - Choose this option to opt in the account you’re currently signed in to, and all of its member accounts. If you choose this option, Compute Optimizer analyzes resources that are in all accounts in the organization, and generates optimization recommendations for those resources.

  5. Choose Opt in. By opting in, you indicate that you agree to and understand the requirements to opt in to Compute Optimizer.

After you opt in, you are redirected to the dashboard in the Compute Optimizer console, and the service begins analyzing the configuration and utilization metrics of your AWS resources. For more information, see Metrics analyzed by AWS Compute Optimizer.

CLI
  1. 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.

  2. Enter one of the following commands depending on whether you want to opt in your individual account or the management account of an organization and all its member accounts.

    • To opt in your individual account:

      aws compute-optimizer update-enrollment-status --status Active
    • To opt in the management account of an organization and include all member accounts within the organization:

      aws compute-optimizer update-enrollment-status --status Active --include-member-accounts

After you opt in to Compute Optimizer using the previous command, the service begins analyzing the configuration and utilization metrics of your AWS resources. For more information, see Metrics analyzed by AWS Compute Optimizer.

Note

To improve the recommendation quality of Compute Optimizer, AWS may use your CloudWatch metrics and configuration data, such as memory utilization. If you want to opt out of this experience and request that AWS does not use your CloudWatch metrics or configuration data to improve recommendation quality of Compute Optimizer, contact AWS Support.

Findings and optimization recommendations could take up to 12 hours to be generated after you opt in, and sufficient metric data must 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.

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

  1. 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.

  2. Enter the following command.

    aws compute-optimizer update-enrollment-status --status Inactive
    Note

    You cannot specify the --include-member-accounts parameter when opting out with the update-enrollment-status command; 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.