AWS CDK and creating ECS/Fargate Service on existing ALB. Use existing listener?

Viewed 1289

So, I've been pulling out my hair on this issue.

I'm trying to create a new Service that's based on an existing ALB and listener that uses TLS/443

I'm using the CDK Python.

I'm doing a

service = ecs_patterns.ApplicationLoadBalancedFargateService(
  self, "a-service",
...

load_balancer=existing_lb

)

putting in all my parameters..... Everytime I do this, it tries to create a new listener on port 80. Even if I try to select my existing listener which is on 443, it errors out and says that existing listener exists and it errors out.

Any thoughts on how to do this on against an existing SSL listener?

3 Answers

If you are talking about an existing resource within AWS you need to set a variable as the listener ARN and then use ApplicationListenerAttributes you should then be able use the load balancer like you would if you were creating a new one in CDK

Related