Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Amazon gives us a very long dns names i.e. Is there a way to map this name into a shorter name

i.e. essentially what i want to do is to modify /etc/hosts file, and map the long name into a short one, i.e. aws1

but because /etc/hosts file only accepts ip address mapping, then I cannot do that.

Is there any other way to do this?


share|improve this question
up vote 2 down vote accepted

If you get an elastic IP then you could add it to your server and then stick a short name for that in /etc/hosts - other than that you can do it with a CNAME in DNS, but that would break when you instances name/ip changes (hence me saying use an elastic ip ;-))

share|improve this answer
hm there is no elegant way, is there? – user32425 Mar 19 '10 at 6:18
The scalable way is to use elastic ip's and DNS. anything else will become a PITA once you have more than a few instances runnig – Geraint Jones Mar 19 '10 at 6:36
You can put a short TTL in the CNAME, which will make it more effective. – Warner Mar 19 '10 at 13:20

The only effective way to do this is to get your own domain name and put a CNAME in that domain pointing at the Amazon instance.

share|improve this answer

Your Answer


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.