Solution 1:

Depending of the nature of the health checks, but for the many projects, is just a route = url/path like /healthcheck that returns 200.

Keep in mind that the health check is not a functional test, it's just to know the application is alive and responds.

If you want to have a full checking, you can have a custom route ( checking a records in db...) but with a delay in checking not every 5 sec but I don't recommand it at all.

So my suggestion to you, add another route, path like /healthcheck, and return a json response with 200 code like server is ok. For this path do not put any security filter ( like token or api key checking...) and configure it in your beanstalk env.

Solution 2:

You may want to change the health check type to EC2 instead of ELB. ELB verifies the specified port is returning 2xx code, while EC2 watches for instance availability only.