I have a .net core API which runs inside a Docker container. This container got deployed to the Amazon ECR where I run it with a Task definition (works already)
- snipet from my Task definition
"portMappings": [ { "hostPort": 50598, "protocol": "tcp", "containerPort": 50598 } ],
When I start the service, the task runs and it works fine. I get my public IP where I can check if my calls are available:

- HTTP 401 is ok because the call checks for a valid token
The problem is when I try to add a Load balancer with a target group.
For this I delete my old service and create a new one with a Load Balancer and Target group

After I start my service like this the Target Group health check response with a "Request Timeout" and keeps restarting my service. When I check for the public IP of the API it still works, only when I try to access my API through the loadbalancer it doesn't work.





