i would like to find the public IP address of my EC2 instance from within the server itself.I know it is possible using ec2-describe-instances. But i want to do it assuming ec2-api-tools are not installed.

Is there a way to find that out?




to get a list of other metadata you can get.


There's a quick way to do it from the console on any server

With curl:

$ curl wgetip.com

With wget:

$ wget wgetip.com

Can't you just nslookup it?


As a matter of course, I now assign an Elastic IP to all new permanent (anything longer than a day) EC2 instances. This makes everything so much easier.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.