Symptoms
On Amazon Web Services, the system hostname is changed either on boot. This can cause license errors.
Procedure
On AWS servers, you must utilize the Cloud Config system. The configuration files are located in:
/etc/cloud/cloud.cfg.d/
In some cases, there may already be a 99_hostname.cfg file in place which is setting the hostname. You can verify if the file exists by listing the directory contents.
# ls -lah /etc/cloud/cloud.cfg.d/
If the file does not exist, it must be created.
# touch /etc/cloud/cloud.cfg.d/99_hostname.cfg
Then, the file must be edited.
# nano /etc/cloud/cloud.cfg.d/99_hostname.cfg
#cloud-config
hostname: foo
fqdn: foo.bar.tld
Replace the "foo.bar.tld" with the full hostname for your server. Replace "foo" with just the last segment of the full hostname for your server.