By using AWS re:Post, you agree to the Terms of Use

How to register IP address for ECS task at startup so that other resources can find it


A partner wants to deploy their on-premises software solution in their AWS environment. The software has a front end component running on Windows that they want to deploy via AppStream. The backend services are provided via a set of ECS task definiitions. The ECS cluster is on a private subnet in the VPC. Every time the tasks are started, their IP address changes. Looking for some suggestions on how to register the task IP address at start time so that the front end can connect to it.

1 Answer
Accepted Answer

You can provide service discovery in ECS in two ways:

  • Placing a load balancer in front of the service. ECS has direct integration with ELB (ALB, NLB, and CLB), and will automatically register and de-register each task from the ELB as needed.
  • Cloud Map. This does not involve an ALB, instead ECS will add each task as a discoverable item in Cloud Map. This can be done either by DNS, in an private Route 53 hosted zone, or via API, or both, depending on how you configure the Cloud Map namespace.
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