Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have this project / research where I need to test/work on an EC2 instance with multiple domains (100+) in it.

Basically I added an entry (for every domain) in httpd.conf

All these domains will have very little traffic, so one instance will be more than enough.

According to route 53 pricing, I'll have to pay like 0.5 $ per domain per month. That translate into 50+ $ / m just for the route 53 for a test project !(test will take months - maybe even keep it indefinitely if things goes well)

I'd like to avoid that charge. I've done a lot of research, it seems the only way to avoid this is by installing BIND9 on my EC2 instance so that my EC2 more or less act like an independent DNS provider

My question is:

  1. Is BIND the way to go in this case?

  2. If so, how to install BIND on an EC2 instance? I googled a lot, the closest I could find is this and this, but the first tutorial is for ubuntu and the second one is not for EC2, many paths are simply not correct in EC2 / Amazon Linux.


PS. I'm using Amazon Linux AMI 2013.03

share|improve this question
1  
I believe Amazon Linux is just another CentOS variant, so I guess you could try CentOS/RedHat/Fedora tutorial. –  dusan.bajic Apr 21 '13 at 8:20
add comment

1 Answer

up vote 1 down vote accepted

I don't know about EC2, but I know some things about DNS...

First, do you have a fixed public IP address, that you can use to reach your EC2 instance?

If yes, then you can install and use BIND as well as any other DNS server. However, you still need to register those domains with some provider, running a DNS server is NOT enough. (Except you can make any client that shall use that server use your DNS server as the only DNS serever.)

However, most providers that offer registration of DNS names also offer DNS server services. Actually most even force you to use their servers. So you gain nothing from running an additional BIND instance.

So go ahead, search for any DNS provider that is cheaper than route 53 and use it.

If no, you cannot run a BIND instance - at least you cannot use it if you are running it. In that case I suspect route 53 does something special for EC2 and route 53 is working because of that. The only thing that could help you then, is to have one domain at route 53 to point to your EC2 instance and several domains at other providers to use CNAMEs to that domain. That should work: HTTPD should see the original names (not the resolved CNAMEs) and therefor work as expected.

share|improve this answer
    
Yes, my EC2 instance does have an elastic IP. The problem is how to install BIND on EC2. As for your comment: most providers that offer registration of DNS names also offer DNS server services, I'm using NameCheap, I'm not sure how that will help me in this case, can you please expand on this point? Thanks! –  TheDude Apr 21 '13 at 15:31
    
OK, I went to Namecheap control panel, switched to their DNS & added an A record where HOST NAME is www, and IP ADDRESS is the EC2 elastic IP address, so far it seems to work, I'm happy, thanks man :) –  TheDude Apr 21 '13 at 15:50
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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