A repo containing a bash script that will delete all versions of a Lambda function execpt for LATEST
The script by default uses the default AWS profile or credentials, this is important to keep in mind when using it.
By default this script will require input to delete each lambda version, this is so you can avoid deleting specific versions if you need, as below:
./lambda-version-cleaner <lambda-function-name>
If you'd like the script to just automatically delete lambda versions, without asking for any input, then you can add an option to the command:
./lambda-version-cleaner -a <lambda-function-name>
This script will delete every lambda version execpt for the LATEST version when -a is added, I'm not responsible if you've accidentally deleted Lambda versions.