Registering a Domain, connecting it to your Static website, and getting HTTPS

Services used: Route 53

                  AWS Cloudfront

Steps

  1. 1) Go to the route 53 management console and click the domains tab on the right. Once you are on that screen you can see your registered domains. In order to create a new domain click the registered domain and choose a domain name of your choice and go ahead and purchase it from Amazon.

  2. 2) Once the domain has been purchased click the hosted zone tab on the left and once the domain has been registered the desired domain will show up in the drop-down list. Select your domain and you will see an NS-hosted zone created for you.

  3. 3) Create 2 records for your site with your URL( example.com and www.example.com), select the record type to be A and the routing policy to be simple(or what your preferred routing policy is).

  4. 4) Navigate to AWS CloudFront and tap the create distribution button
  5. Select the origin path to be the S3 website that you have hosted and leave all the settings as default except the viewer protocol policy which would redirect HTTP to HTTPS. (you need to attach your SSL certificate to this CloudFront distribution)

  6. 5) Once the CloudFront distribution is deployed, go to route 53 and go to your A record

  7. 6) Select the route traffic to and click CloudFront distribution. And select your CloudFront distribution.