EC2 Instance Metadata
You can "learn" a lot about the EC2 instance you are running on, by using simple curl call. To see what kind of metadata you have access to, run:
curl 'http://instance-data/latest/meta-data/'
which will give you things you can add at the end of that URL, to get detailed information. For instance, to get your public hostname:
curl 'http://instance-data/latest/meta-data/public-hostname'
Written by Irakli Nadareishvili
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Tricks
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#