Because remembering IP Addresses is a tricky task, we can associate our Elastic IP Address with a DNS name. If you have a domain, then you can do this via your domain control panel. If you don't have a domain, then you can do this using a free domain provider.
This isn't specific to Amazon, I just put it here because its pertinent to the Elastic IP Address you just created and assigned to your instance.
For this example, I am using my domain provider LCN. You will have to use the control panel of your domain provider, the hardest part of this will be finding the correct page on your domain console, the rest is easy.
My Elastic IP in the example where we created an Elastic IP Address Create Elastic IP Address Tutorial is 126.96.36.199. I am using part of a domain called alanwalker.eu.
Now for those who might not know, the first part of any domain name like www.google.co.uk or mail.quickmail.co.uk is called the A Record. The A Record allows lots of subdomains that have different IP Addresses to be associated with a single top level domain name.
Lets assume I own the domain name super.com and I want to run a web server, mail server, media server and a wiki, I could do something like this:
Web Server www.super.com 188.8.131.52
Mail Server mail.super.com 184.108.40.206
Media Server media.super.com 220.127.116.11
Wiki Server wiki.super.com 18.104.22.168
So I have four sub domains, created by adding four A records (web, mail, media and wiki) and I have associated an IP Address to each one, these would be four Elastic IP Addresses. Each Elastic IP Address would map to a different EC2 Instance (yes you could use a single instance, but that's another level of complication).
After I have logged in to my domain provider, I need to do the following stepts:
Select the relevant domain Select DNS settings Select Add A Record.
I will then see this page.
Here I can add a new A Record, I am using testweb, my domain is alanwalker.eu so my complete domain name will be testweb.alanwalker.eu. For the IP Address we need to add our AWS Elastic IP Address.
Once added, we should see something like the following page.
When you make DNS changes, they can take 24-48 hours to propergate around the entire world. So you might see some people can initially connect to the domain, while other cannot, depending on who their ISP is.
If I open a browser and navigate to testweb.alanwalker.eu I can connect to my AWS EC2 instance, without having to remember the Elastic IP Address.
This is particularly useful if you have a lot of instances and a lot of elastic IP Addresses.