I am trying to access my ec2\'s public hostname from inside the instance.
I would like to run this command
curl http:// 169 254.169.254/latest/meta-data/
You can do like this
The $output variable contains the response.
$output