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
回答済み 10ヶ月前
profile picture
エキスパート
レビュー済み 10ヶ月前
  • 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.

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ