6

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!

jmvbxx
  • 976
  • 3
  • 13
  • 21

2 Answers2

16

@Mark's answer is correct. I am just extrapolating the exact command to list the elastic ip's.

aws ec2 describe-addresses --region us-east-1 --query 'Addresses[*].PublicIp'
Madhukar Mohanraju
  • 2,793
  • 11
  • 28
14

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

aws ec2 describe-addresses
Mark B
  • 183,023
  • 24
  • 297
  • 295