[ec2-beta] How to find public DNS

Eric Hammond ehammond at thinksome.com
Thu Mar 12 01:51:17 GMT 2009


Dave:

You've got it.

  http://169.254.169.254/latest/meta-data/public-hostname

I've heard murmurings in the Ubuntu crowd about possibly developing a
new command line interface to that meta data, but it would be coming
from the same source in the end so there's not much gained.

Though an HTTP request might seem like a lot of overhead, it really
isn't given the way that Amazon seems to implement it.

The curl command you provided loads and runs in under 10 milliseconds
for me (on a c1.medium instance).

I've heard people toss out suspicions that 169.254.169.254 may be
handled directly by the VM host OS so no physical network needs to get
involved.

--
Eric Hammond
ehammond at thinksome.com



Dave Caughey wrote:
> 
> Methinks there is probably an obvious answer that's staring right at me,
> but how does one find out the public DNS of my Ubuntu instance?
> 
> I can retrieve the desired information via
> 
> curl http://169.254.169.254/latest/meta-data/public-hostname
> 
> but is this information not available without running a command to hit a
> remote website?
> 
> Cheers,
> Dave
> 




More information about the Ec2-beta mailing list