Mapping Load Balancer Ports in the ECS Service

0

please understand that I am not good at English.

Suppose the ECR has a repository called AAA and uses EXPOSE port 8080.

Create an ECS cluster and configure containers when defining tasks. Add port mapping information from the container, enter 8080. Enter container port mapping information 8080.

You are about to create a cluster service. If you add a task that you just created here and set the load balancer type to Application, it will automatically write AAA 8080:8080 in the select box of the container selection to load balance. But I want the host mapping to be 443 ports.

Is there any way I can set it to 8080:443?

1回答
2
承認された回答

By "8080:443", I'm assuming you want the LB to listen on port 433 and forward traffic to containers running on 8080. In which case you need to do the following:

  1. Create and configure a target group that is configured for port 8080.

  2. Create and configure your load balancer to listen on port 443 (including specifying the SSL cert to use) and forward traffic to target group created in step1

  3. When configuring the ECS service and specifically "Container to load balance" step, Select Add to Load balancer.

    Select production listener port as 443:HTTPS and for target group name you can select the TG you created.

Some reference documents:

https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-application-load-balancer.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/create-service-console-v2.html

--Syd

profile picture
Syd
回答済み 2年前
profile pictureAWS
エキスパート
Toni_S
レビュー済み 2年前

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

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

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

関連するコンテンツ