ecs-patterns: allow use of existing load balancer in Load Balanced Services #3737
Labels
@aws-cdk/aws-ecs
Related to Amazon Elastic Container
feature-request
A feature should be added or improved.
🚀 Feature Request
General Information
Description
Would like to be able to use an existing load balancer with LoadBalancedFargateService and LoadBalancedEc2Service.
Load balancer pricing includes a fee per hour of load balancer running, which currently means about $18 per month. Running many services, each with its own balancer, can quickly add up.
Additionally, creating a separate load balancer for each service means we can't run multiple services under the same DNS name. So it's not possible to call different microservices depending on the path, for example (probably a common pattern?). Or group multiple subdomains on the same load balancer.
Proposed Solution
Allow passing an existing load balancer as a parameter, the same way it is now possible to specify an existing vpc or cluster.
If an existing load balancer is used, passing any parameter that changes the behavior of the load balancer ( #3691 ) should probably return an error or be ignored, as it might interfere with the behavior of other services. Adding a new listener, or adding a target group to an existing listener may be ok, but changing subnets for an existing load balancer probably shouldn't be done here.
Environment
Other information
The text was updated successfully, but these errors were encountered: