amazon-web-servicescommand-line-interfaceeip

How to get a list of AWS EIP addresses from the command line?


I have a use case where I would like to run a script using all existing elastic IP addresses in a specific VPC.

Any thoughts on the best way to generate that list?

I've been looking through the AWS CLI documentation and can't find anything.

Thanks in advance!


Solution

  • The command you are looking for (which is certainly difficult to find due to the unintuitive name) is:

    aws ec2 describe-addresses