Create ECS service using existing load balancer with existing target group


I'm using the AWS console to create an ECS service (using fargate) in an existing cluster.
In the second step of the wizard (configure network) I choose an existing application load balancer.
The "container to load-balance" section shows my container to add.
When I click "add to load balancer" it initially shows the "production listener port" and "target group name" dropdowns showing "create new".
When I select an existing target group in the dropdown this grays out (disables) the "production listener port" dropdown.
When clicking the "next step" button validation complains the "production listener port" is not filled in (validation message: "please select a listener"). Which isn't possible because the control is disabled.

First selecting a listener port in the wizard and switching to an existing target group after that doesn't remedy the situation as choosing an existing target group blanks out and disables the "production listener port" dropdown causing the same problem when clicking the "next step" button.

How to get the container to register in an existing target group?

The target group is an empty IP address group.
Interestingly it does work if the target group is not empty (the "production listener port" is then filled with 443:HTTPS) but an empty target group (even of the correct type) clears the "production listener port".


  1. Create a new target group of type "IP address" leaving other default settings. Do not register any targets in this group.
  2. Next add this target group to a (new or existing) load balancer (for testing I added the group to an existing load balancer with a single source IP address filter e.g. so it doesn't disrupt normal operations).
  3. When creating a new ECS service select a task definition that has a container with an exposed port 80.
  4. On the second screen "Configure Network" choose the VPC and subnets and under "Load balancing" pick "Application load balancer".
  5. Select the load balancer to which you added the empty target group.
  6. Now click "Add to load balancer" next to the container. This shows the "Production listener port" and "Target group name" dropdowns both initially set to "Create new".
  7. Choosing the empty target group disables the "Production listener port" dropdown and clears it.
  8. If the target group is not empty the "Production listener port" is automatically filled with the correct port.
1 Answer

Same problem here, this is really annoying

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions