I have questions related to the host name in Ubuntu EC2 instances. I have a IPS elastics for hosts that want to be seen from the internet and I have pointed out in the DNS entries with the computer name to those ips. For example, for elastic IP 18.104.22.168 DNS I added my computer name www.example.com.
But I also want to rename the machines which they have, because it is a parameter of the service running on them (ejabberd server). EC2 instances are restarted when changing the host name, and seen on the client requesting dhcp hostname to dhcp Amazon.
My question is ... What is the safest method to change the hostname: dhcp client modify, insert the command in rc.local, etc. ..? Could I have a problem with the internal resolution of traffic between EC2 instances?