I\'m trying to get all Elastic IPs that are not currently assigned to instances.
It\'s easy to get all of the Elastic IPs using this: aws ec2 describe-addresses
aws ec2 describe-addresses
ElasticIPs are also attached to NAT Gateways. In that case InstanceID value will be null but AssociationID is the field which will be present there in any scenario. So better to use associationID to be sure that EIP is in use or not.