| « PreviousNext » | |
![]() ![]() ![]() | Did this page help you? Yes | No | Tell us about it... |
When you are running a production website, it is important to know that your application is available and responding to requests. To assist with monitoring your application’s responsiveness, AWS Elastic Beanstalk performs a periodic health check on running applications and can be configured to notify you by email of potential problems.
To check application health status, every minute or two Elastic Beanstalk sends a request to the
application health check URL. By default, Elastic Beanstalk uses TCP:80 for
non-legacy containers and HTTP:80 for legacy containers. You can choose to override
this setting by specifying an existing resource in your application (e.g.,
‘/myapp/index.jsp’), using the AWS
Management Console. If you override this setting, Elastic Beanstalk will use HTTP.
For instructions
on modifying your health check URL using the AWS Management Console, see Health Checks. AWS Elastic Beanstalk expects a
response of 200 OK for the application to be
considered healthy. If you are unsure if you are running a legacy container, check
the Elastic Beanstalk console. For instructions, see To check if you are using a legacy container
type.
AWS Elastic Beanstalk will change the environment health status to one of four color values depending on how the application responds to the health check. The following table describes the color codes.
| Color | Status |
|---|---|
|
Green |
Your application responded to the application health check URL within the last minute. |
|
Yellow |
Your application hasn't responded to the application health check URL within the last five minutes. |
|
Red |
One of the following:
|
|
Gray |
Your application's health status is unknown because status is reported when the application is not in the Ready state. |
Whenever the application health check URL fails to return a 200
OK response, AWS Elastic Beanstalk performs a series of
additional checks to try to determine the cause of the failure. These additional
checks include verifying the following:
The load balancer still exists
The Auto Scaling group still exists
There is at least one Amazon EC2 instance "In-Service" behind the load balancer
The Amazon EC2 security group is configured to allow ingress on port 80
The environment CNAME exists and is pointing to the right load balancer
All Amazon EC2 instances are communicating
In addition to environment-level health checking, AWS Elastic Beanstalk also communicates with every Amazon EC2 instance running as part of your Elastic Beanstalk application. If any Amazon EC2 instance fails to respond to ten consecutive health checks, Elastic Beanstalk will terminate the instance, and Auto Scaling will start a new instance.
If the status of your application health changes to red, you can take several corrective actions:
Look at environment events. You might find more information about the problem here.
If you recently deployed a new version of the application, try rolling back to an older version that is known to work.
If you recently made configuration changes, try reverting to the former settings.
If the problem appears to be with the environment, try rebuilding the environment. In the AWS Toolkit for Visual Studio, on the AWS Explorer tab, right-click your application environment, and then click Rebuild Environment.
Try using Snapshot logs to view recent log file entries or log in to the Amazon EC2 instance and troubleshoot directly.
You can access operational information about your application from the AWS Management Console at http://console.aws.amazon.com/elasticbeanstalk.
The AWS Management Console displays your environment's status and application health at a glance. A color-coded box next to your environments's name indicates your application status.

To monitor application health
Open the AWS Elastic Beanstalk console at https://console.aws.amazon.com/elasticbeanstalk/.
From the region list, select a region.
Select your application from the drop-down list.
In the AWS Elastic Beanstalk console window below the application selection drop-down list, click the Details for your application in the application's Environments list.
Click the Monitoring tab.
The Monitoring panel appears.

A set of graphs showing resource usage for this particular application environment is displayed. You can click any of the graphs to bring up a window that displays more detailed information.
Click the Max Network In graph.
A detailed view of the Max Network In metric appears.

You can use the drop-down lists at the top of the window to change your view of the selected metric.
Note
By default, only basic Amazon CloudWatch metrics are enabled, which return data in five-minute periods. You can enable more granular one-minute Amazon CloudWatch metrics by editing your environment's configuration settings.