Target deregistration / unhealthy for ECS loadbalancer

0

I have tried creating an ECS cluster using both fargate and EC2 to use one of my prebuilt containers in ECR. I have done this using both the console and terraform code based on this blog: https://medium.com/avmconsulting-blog/how-to-deploy-a-dockerised-node-js-application-on-aws-ecs-with-terraform-3e6bceb48785, but I still face the target deregistration / target unhealthy. My container is on port 8000 for reference. Right now the container is hosted on EC2, but I'd like to use ECS for scalability. Is there a simple and fool proof guide I can follow for this?

1 Answer
1
Accepted Answer

Does the application respond to the health check configured in the load balancer? To pass a successful health check the application needs to respond to the ping. This can be impacted by misconfiguration in the port/path fields in the health check for the target group, security groups attached to the ECS task/load balancer, or an application that isn't serving requests. This knowledge center article has some steps to troubleshoot the health checks.

AWS
Noah_L
answered 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.

Guidelines for Answering Questions