Add a custom domain to the elastic beanstalk and enable SSL

Search for a command to run...

No comments yet. Be the first to comment.
Pods, Deployments and Services kubectl run nginx --image=nginx --port=80 kubectl run nginx --image=nginx --port=80 --expose=true kubectl run nginx --image=nginx --labels="app=web,tier=frontend" kubectl create deployment nginx --image=nginx kubectl c...

Software developers are not only responsible for writing codes, building, and testing applications. They must be responsible for avoiding security risks for the project and the company as a whole. Due to the growing use of the internet, applications,...

I have used Netbeans, Eclipse, STS, and Intellij IDEA but Intellij has been my first choice since my first use. It is one of the best IDE for developing applications. Compared to other IDEs, it provides strong support for autocomplete feature. The de...

At the time of writing this article, there is no official support of Stripe for React-Native. I, having knowledge of backend, was trying to create RESTful endpoints to integrate Stripe payment using Spring boot. Although the documentation of Stripe i...

Elastic Beanstalk is one of the most powerful services powered by AWS for quick deployment and monitoring of your application. It provides a better and easiest way to auto-scale your application and balance workloads. In this article, I am not going to cover how to deploy your application to AWS Elastic Beanstalk, how to add a custom domain, and enable SSL for it.
Prerequisites:

As you can see, demo-application is the name of the application currently deployed. It's a simple Spring Boot application with /api/v1/test endpoint that returns Hello world as a response. Let's see it.

Cool, the application is working. Now, let's try to add a custom domain first to this application. We need to use the Route53 service from AWS to create a hosted zone.
Steps:



Now you need to update your nameservers in your domain provider. In my case, it's Google Domain. Head to the DNS settings page and choose custom name servers.

If you're wondering where did I get those values from, do not worry, it's from the hosted zone dashboard from AWS.

It might take few hours to days depending on your domain provider. Now, when I go to startpeeq.com/api/v1/test I can see a hello world response.

If I try to curl the API with HTTPS, it responds time out because it is not enabled. Let's add the certificate now.



If you choose Email Validation instead, you will receive an email with a link in emails from your domain provider and you have to click on that link.
After few minutes, you will see the status issued in AWS Certificate Manager. Something like this


In the SSL Certificate, you will see the one we newly created. Apply the configuration and wait until the environment updates.


Yay, we're done. Thanks a lot for bearing with me for so long. If you need any help or have any suggestions, feel free to reach out. Peace!