Skip to content

Instantly share code, notes, and snippets.

View mattamizer's full-sized avatar

Matthew Morrissey mattamizer

  • Comcast
  • Abington, PA
View GitHub Profile
@mattamizer
mattamizer / cleanup.py
Last active March 19, 2021 14:26 — forked from luhn/cleanup.py
An AWS Lambda function to delete old AMIs.
"""
Code adapted from and inspired by http://blog.ranman.org/cleaning-up-aws-with-boto3/.
"""
import os
import re
from datetime import datetime, timedelta
import boto3