[ECS] [request]: Support multiple LoadBalancers for ECS TaskSets
- Dominant language
- Shell
- Stars
- 5.4k
- Forks
- 334
- PR merge metrics
- No merged PRs in 30d
Description
### Community Note
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
* Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
**Tell us about your request**
ECS services with default deployment controller or CodeDeploy supports registering to multiple TargetGroups from multiple LoadBalancers - this allows to have a single service that is exposed both internally through internal ALB/NLB and externally through public-facing ALB/NLB. When ECS service deployment controller is EXTERNAL the TaskSet can register only to one LoadBalancer at a time.
TaskSet API `CreateTaskSet` operation [takes an argument](https://docs.aws.amazon.com/AmazonECS/latest/APIReference/API_CreateTaskSet.html#ECS-CreateTaskSet-request-loadBalancers) `LoadBalancers` that is a list but if more than one LB is specified there then the API returns an error: `An error occurred (InvalidParameterException) when calling the CreateTaskSet operation: CreateTaskSet cannot have more than 1 load balancer`
Hence the request is: Allow ECS TaskSet to register to multiple LoadBalancers (at least 2 because this will allow configuring service on both internal and external LBs). Currently, I had to create two services `myservice` and `myservice-internal`
**Which service(s) is this request for?**
ECS
**Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard?**
I have a bit special case because I have to follow a pretty strict deployment procedure due to how `Keycloak` handles the authentication sessions. In my case, I need a Blue/Green deployment with control over the termination process of the old cluster. I cannot remove all boxes at once, I must be removing them one by one waiting for the cluster REBALANCING to finish. Unfortunately, both ECS and CodeDeploy controllers don't give me control over the termination process so I had to go with an EXTERNAL deployment controller. But in EXTERNAL the service cannot register to multiple LBs so I had to work around it.
**Are you currently working around this issue?**
Yes, I had to create two services `myservice` and `myservice-internal`.
Contributor guide
Research direction
Start with the ECS CreateTaskSet API documentation, especially the LoadBalancers request parameter, and compare its behavior for EXTERNAL deployment controllers with the default and CodeDeploy controllers. No repository files or tests are named; done means an EXTERNAL TaskSet can register with at least two LoadBalancers, including internal and public load balancers, without the current validation error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100