Requesting a Certificate using AWS Certificate Manager

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.

Requesting a Certificate

  1. Go to the Certificate Manager Console
  2. Click Request a certificate
  3. Follow the instructions to add a DNS entry to your domain registration
  4. Wait

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.

Configure a Load Balancer for your Elastic Beanstalk Environment

Add a Load Balancer to a Single Instance Environment

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!

  1. Go the the Elastic Beanstalk Console in AWS
  2. Go to Configuration

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.

Get the Load Balancer DNS Name

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:

  1. Go to the EC2 Console
  2. Click Load Balancers
  3. Select the Load Balancer