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달 전

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

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

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

관련 콘텐츠