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.

Instead of assigning an Elastic IP to an EC2 instance, can I just CNAME a URL to the instance's public DNS name?

share|improve this question

3 Answers 3

up vote 4 down vote accepted

Yes, you can do that however the instances public DNS name will change any time an instance is started up. The best options are to either use the elastic IP (EIP) or work behind an elastic load balancer (ELB). Both options would be better to point a DNS entry to and would be able to remain the same on instance restarts. You would use a CNAME entry for ELB and you could use either an A or CNAME record for the EIP option. The advantage of the ELB option is that you could have multiple EC2 instances behind it giving you greater fault tolerance.

share|improve this answer

You can; but you really should get a elastic IP and map an A record to that, it is a much better solution. It'll be more reliable and result in faster DNS for clients(less lookups)

share|improve this answer

Yes. Just remember when you're setting up a cname to an external domain, you need to suffix it with a .

share|improve this answer

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.