If you run "ifconfig –a" on an amazon ec2 instance (linux), it will give you the internal IP address, which is not accessible from outside world. Here is a way to get the public and private IP address for an amazon EC2 instance.
To obtain the IP addresses, issue the following HTTP queries from within the instance:
To obtain the internal IP address:
curl http://169.254.169.254/latest/meta-data/local-ipv4
To obtain the public IP address:
curl http://169.254.169.254/latest/meta-data/public-ipv4
Alternatively, you can obtain the public and private DNS name/IP of an EC2 instance from AWS console (or from any service provider like RightScale.)
Subscribe - To get an automatic feed of all future posts subscribe here, or to receive them via email go here and enter your email address in the box. You can also like us on facebook and follow me on Twitter @akashag1001.
How did you get this?
Mind pointing me to some nice AWS documentation that you know of?
@Raj: I found it here.
Nice Blog very use full inormation.AWS-certified experts help you develop a cloud strategy which aligns with your business transformation road map and implement cloud management solutions to harness the AWS Cloud Managed Services
This post is quite attractive and well-kept, and it needs to be recognised. Thank you for your time and effort, and please keep the information coming.Web Development Services
I adore your work, and it greatly motivates me.
Software Testing Services
This is just what I was looking for. Thank you for sharing this essential information. It is quite beneficial.
QA Testing Services