Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ECS Fargate starts on a different IP on a new task - how to manage it? [closed]

ECS Fargate starts on a different IP on a new task - how to manage it?

What is the best practice to handle only 1 running task and connect it to a domain. I can't use the IP directly because changes on every task restart.

like image 322
07mm8 Avatar asked Sep 07 '25 04:09

07mm8


1 Answers

The best option, don't confused with the cheapest, is to run tasks in an ecs service, rather then individually. If you have service running, you can associate network load balancer (NLB) with it.

The reason for using NLB is that it provides static public IPs for you, unlike application load balancer (ALB).

But if your aim is just to have a stable endpoint to use for a domain, then ALB should be enough.

However, using ALB or NLB is not free.

As a side note, there is a proposal for adding Elastic IP support to Fargate:

  • [Fargate] [EIP support]: add Elastic IP support for Fargate #311

So hopefully, providing static address for a task in Farget will be easier.

like image 135
Marcin Avatar answered Sep 09 '25 23:09

Marcin