Assigning a static IP to an ECS container hosted on an EC2 instance

0

My use case is that I want to be able to terminate and start my ECS container and have it be available at the same static IP that was available previously. The container requires inbound and outbound internet access at port 8080. I believe I need to use a network load balancer to route traffic from an elastic IP, but I am unsure how to associate the network load balancer with any EC2 instance that is launched by the Auto Scaling Group that is attached to my ECS service.

1 Resposta
1

Hi, in the console when you are creating the ECS service you have an option to enable the load balancing, creating a new or using existing resources (load balancer and target group). The ECS will register you tasks in the target group automatically.

profile picture
respondido há 10 meses
profile picture
ESPECIALISTA
avaliado há 10 meses
  • Agree. You do not need a static IP address when using a ELB. You rely on ECS registering to a target group. You should evaluate if an ALB is more appropriate than an NLB

  • You can find the steps to configure the ECS Service with a loadbalancer integration on this documentation.

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas