On Amazon Web Services, the system hostname is changed either on boot. This can cause license errors.
On AWS servers, you must utilize the Cloud Config system. The configuration files are located in:
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
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.