I want to troubleshoot an AWS Elastic Beanstalk environment that's in a Degraded or Severe state.
Resolution
Run the AWSSupport-TroubleshootElasticBeanstalk runbook
Note: Before you start the runbook, make sure that your AWS Identity and Access Management (IAM) user or role has the required permissions. For more information, see Required IAM permissions in AWSSupport-TroubleshootElasticBeanstalk.
Complete the following steps:
- Open the AWS Systems Manager console.
- In the Regions list, select your AWS Region.
- In the navigation pane, expand Shared Resources and then choose Documents.
- In the search bar, enter AWSSupport-TroubleshootElasticBeanstalk and then select the runbook.
- Choose Execute automation.
- For the input parameters, enter the following:
(Optional) AutomationAssumeRole. Enter the Amazon Resource Network (ARN) of the IAM role that allows automation to perform actions. If a role isn't specified, then automation uses the permissions of the user that starts the runbook.
ApplicationName. Enter the name of your Elastic Beanstalk application.
EnvironmentName. Enter the name of your Elastic Beanstalk environment.
(Optional) AWSS3UploaderLink. AWS Support provided you with a URL to upload the log bundle from your Elastic Beanstalk environment. This option is only available to customers who have purchased an AWS Support plan and have opened a support case.
- Choose Execute. For a list of actions that the runbook performs, see Document Steps in AWSSupport-TroubleshootElasticBeanstalk.
- Check the details of every action performed by the automation and the detected issues.
Note: To help you further troubleshoot, manage, and reduce costs of your AWS resources, use the predefined runbooks that AWS Support provides for AWS Systems Manager. These runbooks have the AWSSupport or AWSPremiumSupport prefixes. For more information, see Systems Manager Automation runbook reference.
Manually troubleshoot your Elastic Beanstalk environment
A yellow or red health status warning in your Elastic Beanstalk environment can result from common issues. For more information on warnings, see Health colors and statuses.
Identify the cause of the health warning
Complete the following steps:
- Open the Elastic Beanstalk console.
- Choose your application.
- In the navigation pane, choose Events.
- In the Type column, look for recent events with a Severity type of WARN, and then note these events to troubleshoot later on.
- In the navigation pane, choose Dashboard.
- In the Health section, choose Causes.
Now, you can view the overall health of your environment on the Enhanced Health Overview page. For more information, see Enhanced health monitoring with the environment management console.
Troubleshoot the identified cause of the health warning
Based on the health issues that you identify in the Enhanced Health Overview page, choose one of the following methods to troubleshoot:
- For load balancer health checks that fail, see How do I troubleshoot Elastic Load Balancing health checks with Elastic Beanstalk?
- For other health check failures, see Basic health reporting. For enhanced health reports, see Elastic Beanstalk enhanced health reporting and monitoring.
- For operations that're taking too long, identify the operation in progress that's using the Elastic Beanstalk event stream. Or, log in to your Amazon EC2 instance to monitor the /var/log/eb-engine.log.
Note: Operations that take longer than usual are typically environment deployments or configuration updates.
- For an increased number of 4xx and 5xx HTTP return codes, monitor the access logs of the proxy server to identify the cause. Then, compare the access logs with the application logs to identify the pattern of increased errors. For more information, see Common errors.
Note: The proxy server logs can be the access logs for Apache (/var/log/httpd/access_log), NGINX (/var/log/nginx/access_log), or Internet Information Services (C:\inetpub\logs\LogFiles), depending on your setup.
- For instances in a Severe state, choose a solution based on the warning issued. For more information, see Troubleshoot issues with Amazon EC2 instances.
Note: Your instances can be in a Severe state because of an ongoing deployment, failed health daemon on the Amazon EC2 instance, or high resource utilization. The warning state in your environment is temporary and transitions to green after you address the cause of the issue. For more information, see Health colors and statuses.
- For a failed Elastic Beanstalk health daemon, log in to your Amazon EC2 instance and monitor /var/log/messages and /var/log/healthd/daemon.log to identify the cause.
Note: If you see the following message "None of the instances are sending data," then see How can I resolve the error I get when my EC2 instances fail to communicate with Elastic Beanstalk?
Related information
Run an automation operation powered by Systems Manager Automation
Setting up Automation