Thursday, May 9, 2013

AWS EC2 IP address of running instance

Can use a number of methods, but these are the two that I use:
1: /sbin/ifconfig
2: wget -q -O - http://169.254.169.254/latest/meta-data/local-ipv4

The wget option assumes wget is installed. If it is not, you can issue this command to install it (as root):
 yum -y install wget

No comments:

Post a Comment