Set up SSL (enable https) on a Elastic Beanstalk Application without Load Balancer.

On 2024-09-28 By atomicadmin

Now that you have your Elastic Beanstalk Application up and running (following the steps in the previous blog : here), lets now move to the next step of enabling https for your web app. If you are running multiple instances of your app and your use case forces you to have a Elastic Load Balancer for your Beanstalk app, then its fairly simple to add your ACM certificate to the ALB and this would enable https for your webapp. But if you are running a single instance application, then using a Load balancer is an over kill and ELB is not cheap either. Below process can help bypass the need of a ELB by adding a cloud front distribution. The project architecture in a nutshell is as mentioned in the diagram.

Step 1 : Login to Route 53 and register a domain of your choice. You can also transfer in your existing domains from another registrar if you want to have a domain managed by Route 53. Pricing depends on your chosen domain. You can choose to auto renew on expiration.

Step 2 : Create a public hosted zone for your domain. A public hosted zone determines how traffic is routed on the internet. This will create the NS and SOA records for the hosted zone.

Step 3 : Request a public SSL/TLS certificate from Amazon. By default, public certificates are trusted by browsers and operating systems. We can do this using AWS Certificate Manager (ACM).

Step 4 : Now we move on to Cloud Front and create a new Distribution there.

Step 5 : Now login back to Route 53 and inside the Hosted zone, create a A type record.

With this now your domain should be https enable and should be directing to your elastic beanstalk app.

Comments (0)

Add a Comment