Is there a way to enable HTTPS on Elastic Beanstalk without a load balancer?

Viewed 3628

This is my first time using AWS or any other such platform. I require an https on my website because I use stripe. I have already got an SSL certificate using AWS certificate manager. But the only way to use that is if you have a load balancer on your instance. I do not want to pay for a load balancer because it is too small of a project to do so.

Any other ways to enable HTTPS without a Load Balancer?

3 Answers

The easiest way would be through CloudFront (CF):

For that you would create a CF distribution and setup your SSL certificate and a custom domain (required), and setup EB environment as a custom origin.

The alternative would be to configure nginx on your EB instance to use SSL. For that you would have too check out some tutorials or docs on how to use nginx to serve https requests. Some example:

But this will not work with ACM certificates from what I recall. This is one limitation of such an approach.

As mentioned by jarmod, you can only use ACM certificates with ALB or Cloudfront which both are not free. As far as I know, there is no completely free AWS service that accomplishes this. You can use Let's Encrypt for free auto-renewable certificates to install on your webserver.

We can use eb-extensions to deploy the SSL certificate from S3 and add it as part of the environment variable -> For detailed reference please refer to this doc

Related