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
""" | |
Original Code was adapted from https://github.com/miztiik/serverless-janitor-for-ami/blob/master/serverless-janitor-for-ami.py | |
Modified to give JSON report responses with information about the instance and the exact number images being deleted with their | |
ami-image id. | |
Make sure to include the AmiBackUp key with true as a value so that the script can track the instance for you. | |
""" | |
import boto3 | |
import collections | |
import datetime |
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
""" | |
Original Code was adapted from https://github.com/miztiik/serverless-janitor-for-ami/blob/master/serverless-janitor-for-ami.py | |
Modified to give JSON report responses with information about the instance and the exact number images being deleted with their | |
ami-image id. | |
Make sure to include the AmiBackUp key with true as a value so that the script can track the instance for you. | |
""" | |
import os | |
import re |