Open MedLexAI opened 6 years ago
Looks like you've found a bug. There's a bit of awkwardness with the order of creation and deletion of load balancers and services, and it looks like I blew it in this scenario. 🤬
To delete the vestigial target group, you can run:
aws elbv2 delete-target-group --target-group-arn `aws elbv2 describe-target-groups --names testapp-default --query TargetGroups[].TargetGroupArn --output text`
This command will find the ARN of the errant target group and delete it.
The scenario you pose above is really my target use case. A 1:1 mapping is not required. It's just a matter of creating a load balancer listening on HTTPS and a service listening on port 8080. Let me know if I can help you further get this running! I'm leaving this issue open to investigate this target group business, and I suspect it's related to https://github.com/jpignata/fargate/issues/9.
Hey that did the trick, thanks! Everything is running perfectly now, your project is extremely helpful!
Root cause: Destroy needs to delete all load balancer listeners before destroying the target group.
Is this bug somehow scheduled to get fixed in any release? In which release we can expect the fix?
Ok based on your previous response I was able to successfully create a load balancer on port 8080 and then create a service with an alias that mapped http://example.com:8080 -> lb -> two Fargate tasks. Awesome!
So then I destroyed the load balancer and the service, and then went back to create the load balancer again but this time specifying port 443, and got this error message:
My current architecture is just a Docker image on the backend listening on port 8080 (no SSL currently). I am trying to create a load balancer that will accept connections on 443 with our Amazon Route 53 SSL certs, and then forward those requests to the Fargate Docker tasks that have exposed port 8080.
Is this a possible scenario or have anything to do with this error message above? Do the external application load balancer ports have to map to the Fargate task ports with a 1:1 mapping, e.g. lb:443 -> task:443?