Last active
January 2, 2016 15:19
-
-
Save esacteksab/8322850 to your computer and use it in GitHub Desktop.
Delete disassociated EIP's in AWS with Boto
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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