please help me deploy docker image ECS Fargate with HTTPS

0

I want to create a Docker image using an SSL certificate, and this image is deployed on ECR. I am using the dotnet code.

Mahesh
質問済み 6ヶ月前420ビュー
1回答
2

Hi Mahesh -

While you can add a certificate (a *.pfx file) to your ASP.NET Core project and configure the application to use HTTPS (and redirection from HTTP) by following Microsoft's guidance on setting up a cert with Kestrel for ASP.NET Core, that is not what I recommend.

For the vast majority of use cases for containerized applications, your application may need to scale out to multiple containers, or you may want to have different containerized applications handling different paths (e.g., "app.com/products", "app.com/cart" would be handled by different apps). To handle this, you can run your containers in ECS behind an application load balancer (ALB).

Then, you can upload your SSL/TLS certificate to the load balancer which terminates HTTPS from users' browsers, and the ALB can communicate with your containers that are running ASP.NET Core over either port 80 (HTTP) or using a self-signed cert over HTTPS (443), or really any other port that you like. This way, a single certificate in ALB can handle all the requests to your application, regardless of where the back-end application is running (in containers, on EC2, or even in AWS Lambda). Also, AWS Certificate Manager (ACM) lets you create the certificate, and is integrated with ALB.

profile pictureAWS
Kirk_D
回答済み 6ヶ月前

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

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

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

関連するコンテンツ