There have been times while working with hosts in Amazon AWS EC2 that an admin needs to grab the hostname – but for whatever reason all of the normal methods are inaccessible to them. Maybe the host was lost, maybe it is broken, etc…
- Open the install log, generally found at “/var/log/install”
- Search for “Hostname” – you will most likely see something like “Hostname.*/Hostname ‘i-3efd2y56’/”
“i-3efd2y56” is the hostname. You can then use that hostname to search through audit logs and other useful data collections.