0

I currently have my domains registered and managing DNS with DynDNS.

I'm looking to deploy machines to AWS and spin up DNS records based off their hostnames in AWS, but I'm having problems with Dyn's API and haven't been able to successfully do this.

I don't want to transfer over all of my DynDNS zones and export/import my records to AWS.

Is it possible to create NS records in Dyn that would add the AWS NS values so that whatever records I create within AWS underneath those NS's are then able to propagate normally via Dyn?

I hope this makes sense. Please let me know if I need to elaborate more.

1
  • To answer your question, yes, it's probably possible. You could write a lambda function and associate it somehow with changes, perhaps via SNS. You really would be better off using Route 53, it's all well integrated and supports very low TTL values.
    – Tim
    Dec 21, 2016 at 18:36

1 Answer 1

1

You could delegate a subzone. So for "example": aws.example.com would be for your AWS instances while dyn would continue to serve example.com. Then new hosts in AWS would look like foo.aws.example.com and bar.aws.example.com. To make this work:

  1. Create and test the subzone on AWS with a zone file like:

    ; zone fragment for sub-domain aws.example.com
    ; name servers in the same zone
    $TTL 2d ; default TTL = 2 days
    $ORIGIN aws.example.com.
    @              IN     SOA   ns3.aws.example.com. hostmaster.aws.example.com. (
                   2003080800 ; serial number
                   2h         ; refresh =  2 hours
                   15M        ; update retry = 15 minutes
                   3W12h      ; expiry = 3 weeks + 12 hours
                   2h20M      ; minimum = 2 hours + 20 minutes
                   )
    ; sub-domain name servers
                      IN      NS     ns1.aws.example.com.
                      IN      NS     ns2.aws.example.com.
    ; sub-domain mail server
                      IN      MX 10  mail.aws.example.com.
    ; A records for name servers above 
    ns1               IN      A      10.10.0.24
    ns2               IN      A      10.10.10.24
    
    ; A record for mail server above 
    mail              IN      A      10.10.0.25
    
  2. Delegate to those name servers in your example.com zone at Dyn:

    aws.example.com.      IN     NS     ns1.aws.example.com.
    aws.example.com.      IN     NS     ns2.aws.example.com.
    ns1.aws.example.com.  IN     A      10.10.0.24
    ns2.aws.example.com.  IN     A      10.10.10.24
    

    Note: You need the NS and A records in both the subzone and superzone zone files for this to work.

  3. Increment the serial number in your example.com zone. Reload and test.

For more check out this tutorial.

1
  • @user391602 is this working for you?
    – chicks
    Dec 29, 2016 at 22:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .