Skip to content

Instantly share code, notes, and snippets.

@jodell
Created May 15, 2012 21:53
Show Gist options
  • Save jodell/2705434 to your computer and use it in GitHub Desktop.
Save jodell/2705434 to your computer and use it in GitHub Desktop.
Find the public dns of an ec2 machine, internally.
# Hostname
curl -s http://169.254.169.254/latest/meta-data/public-hostname
# IP
curl -s http://169.254.169.254/latest/meta-data/public-ipv4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment