Skip to content

Instantly share code, notes, and snippets.

@esacteksab
Last active January 2, 2016 15:19
Show Gist options
  • Save esacteksab/8322850 to your computer and use it in GitHub Desktop.
Save esacteksab/8322850 to your computer and use it in GitHub Desktop.
Delete disassociated EIP's in AWS with Boto
import boto.ec2
# Connect to region
ec2 = boto.ec2.connect_to_region('us-east-1')
# Get all disassociated IP addresses
addresses = ec2.get_all_addresses(filters={'instance-id':''})
for address in addresses:
#delete addresses
address.delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment