[Django]-Elastic Beanstalk instance not responding with https

4👍

Depending on the EB stack, activating TLS does not automatically mean that it is being activated on the backend as well. You have two options:

Terminate at the load balancer

User Agent <-- HTTPS --> Elastic Load Balancer <-- Plain HTTP --> Backend

Just change the “instance protocol” setting from HTTPS to HTTP. This terminates the TLS connection on the load balancer and talks unencrypted HTTP with the backend instance. If that fits your security demands, that would be the easiest and quickest solution, because you don’t need to adjust your application.

Terminate at the backend instance

User Agent <-- HTTPS --> Elastic Load Balancer <-- HTTPS --> Backend

In this case, you have to provide an HTTPS listener within your application stack. The stack is partially provided by AWS and depends on your deployment platform, so I would like to forward you to the official docs as they contain the best practices: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/https-singleinstance-python.html

0👍

This process would be much easier if you had your own domain to assign HTTPS to, instructions at https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https.html

However, continuing on myapp123.vdfb.eu-central-1.elasticbeanstalk.com, there are the following steps, though I do not know if they are available in the AWS region that you are using.

elasticbeanstalk ssl without custom domain
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-ssl-upload.html
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/configuring-https-elb.html

0👍

You might need to update ARN of AWS Certificate manager in Load Balancer dashboard. From the first diagram, I see there is EB URL instead of certificate.

Following link might help you

https://docs.aws.amazon.com/elasticloadbalancing/latest/classic/elb-update-ssl-cert.html

Leave a comment