Skip to content

Instantly share code, notes, and snippets.

View arpcefxl's full-sized avatar

arpcefxl

  • Brightkey.cloud
View GitHub Profile
@arpcefxl
arpcefxl / secgroupdelete_ec2classic.py
Created April 14, 2015 04:30
AWS ec2 security group delete scripts. One script is for ec2-classic, the other is for VPC
#!/usr/bin/env python
# Authored by Chad Smith on 3/10/2015
# please feel free to contact me at arpcefxl@gmail.com with comments or questions
# assumes you have already run aws configure or are running in an ec2 role
import boto.ec2, sys
region = sys.argv[1]
secgroup = sys.argv[2]
conn = boto.ec2.connect_to_region(region)
allgroups = conn.get_all_security_groups()