Skip to content

Instantly share code, notes, and snippets.

@tovbinm
Created February 28, 2012 22:18
Show Gist options
  • Save tovbinm/1935634 to your computer and use it in GitHub Desktop.
Save tovbinm/1935634 to your computer and use it in GitHub Desktop.
Get ec2 instance FQDN
ec2hm=`curl -s http://169.254.169.254/latest/meta-data/public-ipv4`; echo ec2-${ec2hm//./-}.compute-1.amazonaws.com; unset ec2hm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment