This is a common task for a System Admin and sometimes it requires automation. Not all System Admins will have all the nice tools to administer their Amazon Web Services resources so we have to come up with poor mans monitoring and scripting. Having a bunch of people doing development in AWS is such a nice way to work but this developers leave a lot of garbage behind and in this post we will see How to find and release unused IP address in Amazon Web Services.
for region in aws ec2 describe-regions --output text | cut -f3
do
echo -e "\nListing IPs in region '$region':"
aws ec2 describe-addresses --region $region
done