AWS Fargate - Application load balancer(ELB) shows unhealthy targets with error “Health checks failed with these codes: [502]”
问题 My app is running on port 3000 and web context is /app, so "http://host:3000/app/index.html" successfully returns index.html page running the app locally. Load balancer(public) listens on port 80 and forwards traffic to targets on port 3000. AWS Fargate - task definition has host and container port mapped to port 3000. - tasks are shown as RUNNING and status HEALTHY but eventually stops because ELB health checks fails. And i am able to see my app start up logs in cloud watch (tasks -> logs).