The SpringBoot application is running as an ECS Task in a ECS Service of an AWS Fargate Cluster. The ECS Service is LoadBalanced as such the Tasks spawned by the Services are automatically registered to a target group.
I am able to call the Health endpoint via API Gateway => VPC Link => Network ELB => Application ELB => ECS Task, as shown below: Call from Postman
However, the HealthChecks seem to be failing and as such, the tasks are being deregistered continously resulting in totally unusable setup.
I have made sure to configure the HealthCheck of the Target Group point towards the right endpoint URL, as shown below: Health Check Settings
I also made sure that the Security Group that the Fargate Tasks belong in allows traffics from the Application Load Balancer, as shown below: Security Group for ECS Tasks
But somehow, the HealthChecks kept failing and the tasks are being deregistered, and I'm very confused!
Your help is much appreciated!