AWS: listing your EC2 instances IP addresses from command line

Increasing number of instances running on Amazon AWS / EC2, ever wondered how to get their list of IP addresses, including elastic IPs, from CLI (i.e. to make sure you don’t have any servers with proxy or SMTP open relay)?

Here is a small bash script that will do it.


The newer aws command (from awscli package) might be easier to use:aws ec2 describe-instances|grep PublicIpAddress

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to Lxadm.com.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.