Max Goh
Max Goh

Reputation: 55

Amazon Web Service ECS (SSL/HTTPS) Issue

I have currently set up my website in AWS ECS with a nginx reverse-proxy architecture with Docker. However, right now I'm facing the issue of securing my website with HTTPS.

I have googled for hours, and got my Amazon Certificate Manager issued, set up a Application Load Balancer with my Cluster's service but to no avail. My nginx.conf is listening at port 80, while my internal services are hosted on port 80 as well. Cloudflare routes my website to each service with *.domain.com.

Thanks in advance guys!

Update:

I have finally gotten my SSL to work with my domain. For those who are encountering the same issue. Try using the classic load balancer instead, I tried multiple times with Application Load Balancer and mapping to different ports but it doesn't work. But it works the moment I used Classical Load Balancer.

Upvotes: 2

Views: 8295

Answers (1)

Mark B
Mark B

Reputation: 200850

  1. Cloudflare should be routing everything to the ALB, not directly to ECS. You have to route all traffic through the ALB in order for the ALB to serve the SSL certificate.

  2. When you request a certificate in ACM you can list multiple domains that you want the certificate to work for. The easiest way to make the certificate to work for your domain and every possible subdomain is to request a certificate for "domain.com" and "*.domain.com".

Upvotes: 4

Related Questions