In order to enable SSL for your application you are going to need to add a certificate to your load balancer. In order to do that - you’re going to need to request a certificate. Luckily, AWS makes this rather easy when you are using certificates with their services. You will simply request the certificate including the domain(s) that you want it to cover and that’s it!
If you are familiar with this process you will notice we add the root domain and a wildcard domain to this certficate request. This way your certificate will cover root domain urls as well as subdomains. If you don’t want to do this, feel free to only add whatever domains you wish to your request. If you didn’t understand that - then just follow our steps.
blackninjadojo.com
*.blackninjadojo.com
It can take some time for the certificate request to complete and the status to become Issued
. In the meantime, we can setup the load balancer.
If you’ve been following along with the Deploying a Rails Application Stack to AWS using Elastic Beanstalk and RDS then you will have setup a single instance environment. Let’s make it a load balanced environment!
When this completes, your Elastic IP will be removed from your EC2 instance and requests for your application will now being going through the load balancer.
You will need to reset your domain’s A record to point to the load balancer. This is how you get the value for the A record: