Skip to content

Instantly share code, notes, and snippets.

View pet0ruk's full-sized avatar

Peter pet0ruk

View GitHub Profile
@pet0ruk
pet0ruk / security-group-cleanup.py
Created December 5, 2016 10:53 — forked from sa-jbrooks/security-group-cleanup.py
Security Group Cleanup using boto3
#!/usr/bin/env python
import boto3
import argparse
def lookup_by_id(sgid):
sg = ec2.get_all_security_groups(group_ids=sgid)
return sg[0].name