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 Risposta
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
con risposta 9 mesi fa
profile picture
ESPERTO
verificato 9 mesi fa
  • 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.

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande