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개 답변
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
답변함 9달 전
profile picture
전문가
검토됨 9달 전
  • 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.

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠