Search code examples
sslwebsocketamazon-elastic-beanstalkcloudflareamazon-route53

How To Get SSL Working with Elastic Beanstalk, Route53 and Cloudflare


I am struggling to get SSL to work on an elastic beanstalk environment with the following configuration:

I have the domain hosted with GoDaddy, which I have routing through cloudflare, which then routes to Route53 with an A record pointing to my subdomain api.myapp.com (which points to my EB environment).

I am using Cloudflare's full E2E encryption, and am using the SSL certificate provided by cloudflare.

In my EB environment, I am using a Classic Load Balancer and have the following configuration (note: my application uses websockets hence the TCP port):

enter image description here

I've added the SSL certificate to the HTTPS configuration but when I navigate to api.myapp.com I am still getting the "your connection is not secure" in the browser.

Does anyone have any suggestions on how to resolve the issue?


Solution

  • Turns out that AWS doesn't allow the use of SSL certificates purchased from cloudflare anymore, so I solved it by provisioning one with CA on AWS.