I have tried port 80 as well as the default port 8080 with the same results where the health check fails. I also tried a different URL from the default "/" with a custom URL "/healthcheck" using the AWS CLI "aws apprunner create-service" command. Also, ensured the health check was being done with HTTP with the AWS CLI. More detailed error messages are definitely needed. This is a Flask app using a Docker container and the port and /healthcheck URL are accessible when running the container locally. The same container works when deployed to Fargate. Is anyone from Amazon App Runner team monitoring this Forum?
I resolved the problem by ensuring that my Dockerfile had an ENTRYPOINT value which launches the software desired - in my case, Flask.
My container was configured by both a docker-compose.yml file and a Dockerfile. I had defined the ENTRYPOINT, actually spelled in lower case within the docker-compose.yml file - entrypoint, within the docker-compose.yml file vs. the Dockerfile. AppRunner ignores, truly is not aware of, the docker-compose.yml file, since it is simply driven by the container stored in the ECR. AppRunner should perhaps also consider the docker-compose.yml file. In my organization and others I'm familiar with the docker-compose.yml file or a set of docker-compose files are extremely important in the configuration of the Docker environment. The Docker file alone is NOT enough most of the time. In this case, the ENTRYPOINT can be specified in the Dockerfile and if any entrypoint is also configured in the docker-compose.yml file it overrides the Dockerfile ENTRYPOINT (https://docs.docker.com/compose/compose-file/compose-file-v3/#entrypoint)
Apprunner fails on Health checkasked 7 months ago
ApplicationLoadBalancedFargateService with listener on one port and health check on another fails health checkasked 6 months ago
Problem on Application load balancer with rule: Health check only responds on the default ruleasked 2 months ago
App Runner Health Check fails although Application logs show already receiving the request.asked a day ago
Health check on custom port number fails.asked a year ago
App Runner fails to update on any environment variable changeasked 3 months ago
Health check in route53 by portasked 10 months ago
accessing site with custom port and static ipasked 7 months ago
LoadBalancer health check fails but instance is not terminatingAccepted Answerasked 8 months ago
Elastic BeanStalk shows unhealthy; health check not workingasked 6 months ago