Skip to content

Instantly share code, notes, and snippets.

View alegmal's full-sized avatar
😶‍🌫️
What's happening?

Aleg Malinovsky alegmal

😶‍🌫️
What's happening?
View GitHub Profile
@alegmal
alegmal / lambdaAMIBackups.py
Created January 29, 2018 07:30 — forked from bkozora/lambdaAMIBackups.py
AWS Lambda AMI Backups
# Automated AMI Backups
#
# @author Robert Kozora <[email protected]>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and create an AMI of it. Also, it will look for a "Retention" tag key which
# will be used as a retention policy number in days. If there is no tag with
# that name, it will use a 7 days default value for each AMI.
#
@alegmal
alegmal / lambdaAMICleanup.py
Created January 29, 2018 07:18 — forked from bkozora/lambdaAMICleanup.py
AWS Lambda Function to Delete AMIs and Snapshots
# Automated AMI and Snapshot Deletion
#
# @author Robert Kozora <[email protected]>
#
# This script will search for all instances having a tag with "Backup" or "backup"
# on it. As soon as we have the instances list, we loop through each instance
# and reference the AMIs of that instance. We check that the latest daily backup
# succeeded then we store every image that's reached its DeleteOn tag's date for
# deletion. We then loop through the AMIs, deregister them and remove all the
# snapshots associated with that AMI.
@alegmal
alegmal / Futurama Tribute Page.markdown
Last active May 27, 2023 21:29
Futurama Tribute Page