New ECS service - not able to create a target for a 2nd listener

0

We have created a cluster in ECS and now we want to create a service in this cluster. During the creation process it's only possible to define 1 listener. We point this listener to a target group en the target group automatically picks a target. (that target is neatly assigned a dynamic port mapping)

According to the documentation it's possible to manually create a 2nd listener via the EC2 console (within the Load Balancer section). When we do that the target group is created, but in that target group the target isn't automatically created. And a port is not dynamically mapped.

We need to do this manually, but that's not what we want. We also want a target to be automatically added to the target group for the 2nd listener with the correct dynamic port (docker proxy port). Just like the 1st listener. Is that possible?

Screeshot creating service

  • Can you confirm why you need a 2nd listner?

2개 답변
0

Our problem is that the application running on the EC2 instance needs to use port 80 and 443. This needs to be a 1-on-1 connection with the ELB. We tried a redirect on the ELB, but that doesn't work. We don't see an option in the console (when creating the service) to add a 2nd target group. Do you know if this option exists? Ports

Thomas
답변함 7달 전
  • Yes as per my answer. This is possible but not via the GUI. You have to do it via CLI or a deployment. Please see URL in answer.

0

Im not sure why you need a 2nd target? however yes, this is possible.

You can register the ECS Service to a 2nd Target group so you do not manually have to add or remove targets. You can’t do this via the GUI however.

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/register-multiple-targetgroups.html

profile picture
전문가
답변함 7달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠