Skip to content

Load balancer health check fails on Elastic Beanstalk environment

0

It's a Python 3.12 running on 64bit Amazon Linux 2023/4.3.2 environment. I'm using the default VPC, no public IP address. It also failed on an environment I had created as a single instance and switched to load balanced. The website works fine when it is a single instance. The health check url works in that case. If I create an environment with the sample code the health check still fails. I can't figure out why the health check fails when I try to make it load balanced. I'm guessing it is something to do with the VPC but it looks fine from what I can tell.

The error is: Target.FailedHealthChecks Instance has not sent any data since launch.

1 Answer
1
Accepted Answer

Hello.

EC2 instances launched with ElasticBeanstalk communicate with ElasticBeanstalk.
Therefore, if a public IP address is not attached to EC2, communication will not be possible and the health check will fail.
To work around this, you need to use a NAT Gateway to access ElasticBeanstalk's service endpoints, or set up a VPC endpoint.
Please check the following document, which describes the VPC endpoints required to use ElasticBeanstalk.
https://repost.aws/knowledge-center/elastic-beanstalk-vpc-endpoints
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/vpc.html

EXPERT

answered 2 years ago

EXPERT

reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.