Free DNS Servers on Amazon Web Services (AWS)?
Recently, I was researching how to run Ubuntu instances on AWS. I found http://aws.amazon.com/free. The free tier includes 750 hours for EC2 Linux Micro Instances and 30GB of EBS storage. After clicking around, I figured out this is what you get with the Micro EC2 Instance running Ubuntu 12.04 LTS:
- The default Ubuntu 12.04 LTS AWS image boots on a 8GB root partition created on EBS. This allows you to run a a normal Ubuntu server. If you create a larger EBS partition, Ubuntu will automatically expand the file system on first boot, but 8GB should be plenty for a typical DNS server.
- The Micro Instances includes 600MB of RAM
- I thought I read that the Micro Instance includes 2 CPU cores, but the image I booted only shows 1 CPU.
This should be fine for a backup DNS server.
The AWS documentation is large and intimidating. In the past, AWS encouraged a lot of specialized AWS development to create paravirtualized kernels that worked under Xen combined with VM instances that booted up and automatically configured themselves to use S3 storage. This is a great model for web sites and other Internet based services that require scaling across many nodes, it seemed like overkill for something like DNS that typically only requires a couple of high availability servers. Fast forward several years later and now AWS lets you easily create VM backed by EBS storage that can be managed like a typical server. Here are the steps I followed to create my AWS based DNS server:
- Opened an AWS account - credit card is required (!)
- Configure and start a new Ubuntu 12.04 LTS micro instance. The free instance is clearly identified and the defaults end up with an EBS backed server with a 8GB root partition.
- Add a public IP address: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/elastic-ip-addresses-eip.html
- Login to the new instance with the AWS generated SSH key pair: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AccessingInstancesLinux.html
- Configure your new instance normally
Now we just have to wait and see if it is really free!
After about 6 months, I received an “abuse” notice from AWS. It turns out that they don’t allow running recursive DNS servers. I use recursive DNS to test things out, but it was no big deal to disable it.