By default, when you restart the computer, it will probably assign a different IP address , and the DNS name is ugly because it is based on the IP address and it is issued when the instance is closed.
If your server is used on the public Internet, you can have at least 3 options:
- Make the IP address static using Elastic IP from the EC2 console and register this IP address with some DNS service like Go Daddy.
- Leave your IP address dynamically and use a dynamic DNS service such as DynDns .
- If you need to use an elastic load balancer, use the AWS Route 53 DNS service and instead of creating a resource record pointing to a static IP address, you can use an Alias ββResource Record pointing to your elastic load balancer, I think it will be the best option if you have more than 1 server.
source share