Moving my DNS records to Route 53 with Terraform

I’m one of those people who seems to collect domain names.
I’m even using most of them! But the DNS for these domain names is all over the place. I’m gonna fix that…

The vast majority of my collection I’ve purchased from GoDaddy.
I’m fine with that. I often hear bad stuff about them, but they’ve been good to me so I’m in no rush to move.

But the DNS part… that’s spread out all over the place.
Some of it is managed by GoDaddy, some of it is delegated to other hosting providers1.
lmhd.me specifically is on PointDNS2.

So I’m going to move it all to one place as much as possible: AWS Route53

Why Route 53?

There are lots of DNS solutions out there: some free, some paid, some self-hosted. I could have gone with any of them.

But I wanted something I could automate, preferably with Terraform (because I’m familiar with that from work).

Terraform has many DNS providers to chose from, and I looked through quite a few of them.

But I eventually decided on Route53, partly because it’s cheap3, and partly because I’m thinking of moving some of my Heroku stuff over to AWS at some point.

ALIAS records for my apex domain

The reason I went with PointDNS origiainally was because my apps were on Heroku, and it was available as a free add-on.

The original lmhd.me was a static page on HostGator, then I moved it to Heroku. Now it’s on GitHub Pages.

When it was on Heroku, I needed what PointDNS (and others) refer to as an ALIAS record. From the PointDNS console:

Please specify a DNS name to alias. Point will automatically duplicate A and AAAA records from this address at 15 minute intervals. This may be used as an alternative to a CNAME for the root of a domain.

In the case of lmhd.me this works like:

lmhd.me is an ALIAS record for lucymhdavies.github.io

lucymhdavies.github.io is a CNAME for github.map.fastly.net

github.map.fastly.net has A records for the relevant IP addresses

PointDNS creates a A records for lmhd.me based on the github.map.fastly.netA records

Route 53 has no such concept. The only Alias records it has is for other AWS services.

I was originally thinking of just setting up A records, as GitHub suggests, but I can do better than that.

Apparently I have so far had 1.24 thousand requests in April (as of 1530 on 2nd April). I can’t seem to get historical data though, so I’ve extrapolated that to ~40k requests per month.
Even then, it’s only $0.52 for lmhd.me per month, according to the AWS calculator

PointDNS free limited to one domain, and limited to 10 records per domain. Paid, costs $25/mo, for up to 10 zones. Or $2.50 per zone per month.
PointDNS pricing

I didn’t really compare pricing for any of the others. AWS is cheap enough, and PointDNS isn’t. ↩