6

We use Amazon Route53 as my company's primary DNS. As we grow into using multiple services from different providers, each of them requested some kind of DNS entry to verify our domain and/or use their services. As of now we have about 60 entries in our primary hosted zone.

It's starting to get confusing since Amazon does not allow even a simple description field for each entry so we know what it means without having to parse it.

Is there a better/different way to manage this?

2 Answers 2

3

Recommendation

Start learning to use, and using the AWS Command-line, combined with your own homegrown solution to manage your DNS entries.

I personally have a solution which rounds up multiple text files (each with customer identification and comments contained) into one file, which then ships off to my authoritative DNS whenever there is an update.

More info on AWS Route53 CLI here


Example solution

1) Get cli53

2) Create a folder and fill it with BIND compatible zonefile.txt for each customer.

C:\zones\customer.com.txt
C:\zones\example.org.txt
C:\zones\loyal-customer.net.au.txt

3) Write a script which pulls gets each file and uploads it to AWS Route53:

Powershell

$zonefileDir = "C:\zones\"

foreach ($file in (ls $zonefileDir -r))
{
    # Remove the '.txt' from each file, so we have the proper domain name
    $zone = ($file.name -replace "\.txt$","")

    # import the BIND zonefile and replace any existing records
    cli53 import $zone --file $file --replace --wait
}

Bash

directory="/etc/bind/zones/"
for file in `ls $directory`
do
    zone=`echo $file | grep -Po "^.*?(?=\.extension)"`
    cli53 import $zone --file $directory$file --replace --wait
done

4) Whenever you need to make changes, you make it inside your separated customer zone files, which you can also separate with directories.

5) Sync all of your zonefiles in Git so you can track changes to each zonefile in case you need to revert.

2
  • Seems like a good idea. Would you have anything to share regarding the file/application format so me and others do not have to start from scratch?
    – tucaz
    Mar 26, 2014 at 23:10
  • Added in an example solution for you. Mar 27, 2014 at 0:03
0

I don't know of any off-the-shelf solution to do this.

That said, homebrewing a Route53 management system should be fairly simple - a couple mysql tables and a sync script in a language of your choice is really all it would take.

1
  • dns-api.com is one existing solution that will let you use git to upload to route53.
    – user9565
    Dec 19, 2014 at 9:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.