Last Updated: February 25, 2016
· irakli
Avatar ika

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'
Say Thanks