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.

1 Resposta
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
respondido há 6 meses

Você não está conectado. Fazer login para postar uma resposta.

Uma boa resposta responde claramente à pergunta, dá feedback construtivo e incentiva o crescimento profissional de quem perguntou.

Diretrizes para responder a perguntas