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 réponse
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
répondu il y a 6 mois

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions