Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

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

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?

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

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

over 4 years ago · Santiago Trujillo Report

0

I checked https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_ecs_patterns/ApplicationLoadBalancedFargateService.html

There is nothing in there that you would point to an existing listener.

there is listener, but then you need to specify the domain and a bunch of other things that aren't relevant...

and when I did put the listener in, it said, that the port was busy...

So i guess there is no way to create a Fargate Service with an existing ALB and existing listener

over 4 years ago · Santiago Trujillo Report

0

You may not be able to do it using the ECS patterns package, but you should be able to do it using the ECS and Elastic Load Balancer V2 packages. I think you should be able to import either the listener or a target group, and then add your service to that. See https://docs.aws.amazon.com/cdk/api/latest/python/aws_cdk.aws_elasticloadbalancingv2/ApplicationListener.html#aws_cdk.aws_elasticloadbalancingv2.ApplicationListener.from_application_listener_attributes

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!