Node.js DNS Server with API

I am currently in the process of creating a SaaS, and when an organisation registers for a new instance, it calls EC2 and creates an instance and sets it up with the details they request, and it starts running on a subdomain.

The master domain is registered with GoDaddy, if that helps.

The problem I am having is this: How can I create a subdomain and redirect it to the instance without taking out the other instances. I'm hoping to use (if possible) a node.js DNS server that listens to a DB, and on update, starts listening to the subdomain and fowards it to the instance. I have looked at Simple DNS Server in Node.JS? (Primary/Authoritative DNS Server) (maybe ndns?) but it looks like all the suggestions use configuration files.

Is this possible with node.js, and if not, any other DNS server?

Node.js is a great use case for DNS.

Your question is a bit vague, but check out this recently released node.js DNS server: https://github.com/iriscouch/dnsd

While it does support static files I don't see why it couldn't be configured to work with dynamic data as well. The question is where will you put all of the data (in a db, in memory, etc?)

It's been tested in production by the dudes at iriscouch (which hosts NPM, etc.)