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're asked to opt in using the account that you’re signed in with. Before you can use the service, you must opt in or out. In addition, you can also opt in or opt out using the Compute Optimizer API, AWS Command Line Interface (AWS CLI), or SDKs.

By opting in, you're authorizing Compute Optimizer to analyze the specifications and utilization metrics of your AWS resources. Examples include 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 doesn't have AWS Organizations enabled. For example, suppose that you opt in to Compute Optimizer while signed in to a standalone account. Then, Compute Optimizer analyzes resources that are in the account and generates optimization recommendations for those resources.

  • Member account of an organization - An AWS account that's a member of an organization. If you opt in to Compute Optimizer while signed in to a member account of an organization. Then, Compute Optimizer 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 that you opt in to Compute Optimizer while signed in to a management account of an organization. Then, Compute Optimizer gives you the option to opt in the management account only or the management account and all member accounts of the organization.

    Important

    To opt in all member accounts for an organization, make sure that the organization has all features enabled. For more information, see Enabling All Features in Your Organization in the AWS Organizations User Guide.

    When you opt in using your organization's management account and include all member accounts within the organization, trusted access for Compute Optimizer is enabled in your organization account. 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.

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. You can opt in again, but this must be done using the AWS CLI. When you opt in using the AWS CLI, run the update-enrollment-status command and specify the --include-member-accounts parameter. Alternatively, you can enable trusted access directly in the AWS Organizations console or by using 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 the management account of your 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're redirected to the dashboard in the Compute Optimizer console. At the same time, the service immediately starts 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 didn't already install the AWS CLI already, install 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. Choose if you want to opt in your individual account or the management account of your 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, Amazon Web Services might 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 to request that AWS stop using your CloudWatch metrics and configuration data to improve the recommendation quality of Compute Optimizer.

Consider the following after opting in:

  • After you opt in, findings and optimization recommendations can take up to 12 hours to be generated. Moreover, for optimization recommendations can be generated, sufficient metric data must be accumulated. For more information, see CloudWatch metric requirements.

  • Findings and recommendations are displayed in the dashboard and the recommendation pages of the Compute Optimizer console. For more information, see Viewing the AWS Compute Optimizer dashboard and Viewing resource recommendations.

  • Some recommendation preferences such as the enhanced infrastructure metrics is paid feature. This feature extends the metrics analysis look-back period of EC2 instances, including instances in Auto Scaling groups, to up to three months. By default, the look-back period is 14 days. For more information, see Activating recommendation preferences.

  • Using the management account of your organization, you can delegate a member account as an administrator for Compute Optimizer. A delegated administrator can access and manage Compute Optimizer recommendations. A delegated administrator can also set recommendation preferences for your entire organization without needing to access the management account. For more information, see Delegate an administrator account.

Opting out your account

Use the following procedure to opt out your account from Compute Optimizer using the AWS CLI. The same procedure also deletes 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 can't 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 can't specify the --include-member-accounts parameter when opting out with the update-enrollment-status command. If you specify this parameter when opting out with this command, an error occurs.

Your account is opted out of Compute Optimizer after running the previous command. At the same time, your account's recommendations and related metrics data are deleted from Compute Optimizer. If you access the Compute Optimizer console, the option to opt in again should be displayed.