Setup AWS Lightsail with a Route 53 domain

A few days back I decided to revive my old blog hosted on webs.com. I had already transferred the management of my existing domain irtaza.info to Route 53. Initially I had a plan to create a serverless blog using AWS Lambda and Flask-Blogging. However to save time and get some great features of WordPress I have used a pre-configured, ready to run WordPress AMI running on Amazon EC2 via AWS Lightsail.

The whole process was simple and I was up and running within minutes. The only issue I faced was linking my existing domain managed by Route 53 to the EC2 instance managed by Lightsail. I had already created a zone in Lightsail, and create DNS entries by performing Steps 1 and 2 in this guide: Create a DNS zone in Amazon Lightsail

To complete Step 3, Update the name servers with your domain registrar, I did various things including changing  the name servers and playing around with Hosted Zone entries that already existed when I first transferred my domain to Route 53. But nothing seemed to work for me. The answer was pretty simple though, all I had to do was to get rid of the Hosted Zone. For Lightsail, Route 53 can be used as a registrar but the name server duties are handled by Lightsail-specific name servers. So to use a domain name you registered or transferred into Route 53 as a Lightsail-managed domain, first remove the domain’s Hosted Zone from Route53 if it exists:

  1. Open the Route53 AWS console.
  2. Click Hosted Zones on the left.
  3. Highlight the hosted zone with the domain name you wish to use in Lightsail.
  4. Click Delete Hosted Zone at the top of the zone list.

Now you need to set the Name Servers for the domain to Lightsail name servers:

  1. Open the Route53 AWS console.
  2. Click Registered Domains on the left.
  3. Click on the domain name of the domain you wish you use with Lightsail.
  4. One of the categories is Name Servers, click Add or edit name servers at the bottom of the name server list.
  5. Replace these with the name servers shown on the detail page for the domain entry in the Lightsail console.

Your domain name should now redirect to your Lightsail instance static IP. This may take a bit longer, deoending on the TTL settings thatw ere configured in the Hosted Zone.

About the Author: Irtaza

Leave a Reply

Your email address will not be published. Required fields are marked *

Bitnami