Static websites on AWS — Part II

John Dusaitis
4 min readNov 12, 2020

In our previous article Static websites on AWS — Part I we’ve seen how to create a simple static web page and hosted it to AWS S3.

In this article we will see how access this web page from a custom domain name (dusaits.co).

Step 1 — Buy the domain name

When it’s time to register a new domain name, papaki.com is my first choice. Papaki.com is one of the most reliable domain registars in Greece with great support.

We’re going to register the domain name dusaitis.co.

We added this to the basket and after some clicks we have purchased it.

Step 2 — Set the Amazon Route 53

In this step you need to create a Hosted Zone. Hosted zones allow you to define how AWS Route 53 is going to resond to DNS queries for domain names such as dusaitis.co.

Click on the “Create hosted zone” button.

Type your domain name and click on the “Create hosted zone” button.

Two records were created. A NS and a SOA. You need the values from the NS record. Copy the values from the field “Value/Route traffic to” to the clipboard.

Step 3 — Update the DNS values to your domain registar

Go back to your domain registar and configure the Namespace values of the domain name dusaitis.co.

Copy the four values one by one. Please make sure that you removed the last .(dot) from each record.

Eg: ns-1257.awsdns-29.org.ns-1257.awsdns-29.org (without the dot)

After some clicks, the the DNS values will have been updated.

When you update the DNS values it takes some time in order to see the change. Have a break about 15 ~ 20 minutes.

Step 4. Map the domain name with the S3 Bucket

Go back to the AWS Route 53. Choose the dusaitis.co hosted zone. Now you will create a simple A record which maps the dusaitis.co domain name with the S3 Bucket we created in the previous article Static websites on AWS - Part I .

Click on the “Create record” button.

Then choose the “Simple routing” radio button, and then “Next”.

Click on the “Define simple record” button.

In the “Value/Route traffic to” choose the “Alias to S3 website endpoint”. Then, choose the eu-central-1 region. Choose the dusaitis.co S3 Bucket from the list and press the "Define simple record" button.

Finally, click on the “Create Records” to create the A-type record and complete the process.

Congrats! 🎉 you have completed the process! 🚀

Again, when you update DNS values it takes some time in order to see the change. Have another break, and check it after (15 ~ 20 minutes).

Check it out at http://dusaitis.co

In the upcoming Part ||| we will see how to run the site under HTTPS.

For more tips follow me on Twitter.

Thanks for reading!

--

--

John Dusaitis

Front End Developer and Designer. I love experimenting with design systems, typeface design and UI/UX.