Thursday, March 6, 2014

Find the Public Hostname of an Amazon EC2 Instance

If you need to find the public hostname of an Amazon EC2 instance, there is a simple URL which, when cURL'ed will return the hostname:

This URL only works inside the AWS infrastructure (so you must be on an instance to run it properly), but you could easily run:


This will return the hostname in the standard format:

No comments:

Post a Comment