View a markdown version of this page

AI-powered environment analysis - Amazon Elastic Beanstalk
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

AI-powered environment analysis

Amazon Elastic Beanstalk's AI-powered analysis identifies root causes and recommends solutions for environment health issues. When your environment experiences problems, you can request an AI analysis using the RequestEnvironmentInfo and RetrieveEnvironmentInfo API operations with the analyze info type to get AI-generated insights and recommended solutions.

Note

AI analysis is available on supported Amazon Linux 2 and AL2023 platform versions released on or after February 26, 2026. For Windows Server platforms, AI analysis is available on platform versions released on or after April 22, 2026.

How it works

When you request an AI analysis, Elastic Beanstalk runs a script on an instance in your environment that collects recent events, instance health, and logs (up to 170,000 tokens of data). It then sends this data to Amazon Bedrock in your account and returns insights and recommended next steps.

Prerequisites

Before you use AI analysis, verify that your environment meets the following requirements:

  • Environment running a supported platform version

  • Instance profile with required permissions (see Required permissions below)

  • Anthropic use case details – AI analysis uses Anthropic Claude models through Amazon Bedrock. Anthropic requires you to submit a one-time use case details form before you can invoke their models. To submit this form, select any Anthropic model from the model catalog in the Amazon Bedrock console, or call the PutUseCaseForModelAccess API. You only need to do this once per Amazon account. If you submit the form from the Amazon Organizations management account, it automatically covers all member accounts in the organization. For more information, see Access Amazon Bedrock foundation models.

    • Even after submitting the use case details form, the first invocation of an Anthropic Claude model in your account requires Amazon Marketplace permissions to complete an automatic model subscription. If your instance profile doesn't have these permissions, AI analysis fails with the following error:

      AccessDeniedException: Model access is denied due to IAM user or service role is not authorized to perform the required AWS Marketplace actions (aws-marketplace:ViewSubscriptions, aws-marketplace:Subscribe) to enable access to this model.

      To resolve this, add aws-marketplace:Subscribe, aws-marketplace:Unsubscribe, and aws-marketplace:ViewSubscriptions permissions to your instance profile. These permissions are only needed for the first invocation in an account. After the model is enabled, you can remove them. For more information, see Grant IAM permissions to request access to Amazon Bedrock foundation models.

  • GovCloud regions – If you are using Amazon GovCloud (US) regions, you must enable access to the latest Anthropic Claude Sonnet and/or Opus model in Amazon Bedrock before using AI analysis. For instructions on enabling model access in GovCloud regions, see Manage access to Amazon Bedrock foundation models. For information about the latest available Anthropic Claude Sonnet and/or Opus model, see Supported Regions and models for inference profiles.

Required permissions

To use AI analysis, the Amazon EC2 instance profile for your environment must have permissions to invoke Amazon Bedrock. Add the following permissions to your instance profile:

  • bedrock:InvokeModel

  • bedrock:ListFoundationModels

  • elasticbeanstalk:DescribeEvents

  • elasticbeanstalk:DescribeEnvironmentHealth

For more information about configuring instance profiles, see Managing Elastic Beanstalk instance profiles.

Note

If this is the first time an Anthropic Claude model is being invoked in your account, you also need Amazon Marketplace permissions (aws-marketplace:Subscribe, aws-marketplace:Unsubscribe, and aws-marketplace:ViewSubscriptions). See Prerequisites for details.

Using AI analysis in the console

From the environment overview

When your environment's health status is Warning, Degraded, or Severe, an AI Analysis button appears in the environment overview section. Click on this button to initiate an AI analysis of your environment.

From the Logs page

You can also access AI analysis from the Logs page in the navigation pane. Click on the AI Analysis button to request an AI-powered analysis of your environment's current state.

Using AI analysis with the Amazon CLI

You can use the Elastic Beanstalk API through the Amazon CLI to request and retrieve AI analysis programmatically.

Request AI analysis

Use the RequestEnvironmentInfo operation with the InfoType parameter set to analyze.

Example Amazon CLI - Request AI analysis
aws elasticbeanstalk request-environment-info \ --environment-name my-env \ --info-type analyze \ --region us-east-1
Retrieve AI analysis

Use the RetrieveEnvironmentInfo operation with the InfoType parameter set to analyze to retrieve the analysis results.

Example Amazon CLI - Retrieve AI analysis
aws elasticbeanstalk retrieve-environment-info \ --environment-name my-env \ --info-type analyze \ --region us-east-1

The response includes an AI-generated analysis of the current state of the environment, along with recommended solutions for any identified issues.

Using AI analysis with the EB CLI

If you use the EB CLI, you can request AI analysis with the --analyze (-ai) option of the eb logs command. The command requests the analysis, waits for it to complete, and displays the results.

Example EB CLI - Request AI analysis
$ eb logs --analyze

The --analyze option is not compatible with --instance, --all, --zip, or --log-group. For the full command reference, see eb logs.

Note

The --analyze option requires EB CLI version 3.27 or later.

Important considerations

  • Pricing – AI analysis uses Amazon Bedrock to process your environment data, and standard Amazon Bedrock pricing applies for model invocations. For pricing details, see Amazon Bedrock Pricing.

  • Platform requirement – AI analysis is available on Amazon Linux 2 and AL2023 based platform versions released on or after February 26, 2026. For Windows Server platforms, AI analysis is available on platform versions released on or after April 22, 2026. To use this feature, update your environment to a supported platform version. For more information, see Updating your Elastic Beanstalk environment's platform version.

  • Permissions – Before using AI analysis, ensure that your instance profile has the required Amazon Bedrock permissions (bedrock:InvokeModel and bedrock:ListFoundationModels) and Elastic Beanstalk permissions (elasticbeanstalk:DescribeEvents and elasticbeanstalk:DescribeEnvironmentHealth).

  • Data privacy – The analysis sends environment events and logs to Amazon Bedrock in your account for processing. For information about how Amazon Bedrock handles your data, see Amazon Bedrock Security and Compliance.

  • Service quotas – AI analysis uses an Anthropic Claude model in Amazon Bedrock, which has default quotas for requests per minute and tokens per minute. If you encounter throttling errors, you can request a quota increase. For more information, see Requesting a quota increase.

Supported platform versions

AI analysis is supported on Amazon Linux 2 and AL2023 based platform versions released on or after February 26, 2026. For Windows Server platforms, AI analysis is supported on platform versions released on or after April 22, 2026. To verify your platform version, see Elastic Beanstalk release notes.