epsagon / clear-lambda-storage

Removes old versions of Lambda functions
https://epsagon.com/blog/how-to-free-aws-lambda-code-storage-codestorageexceeded/
MIT License
166 stars 44 forks source link

Allow script to be directly executed as a module #20

Closed drodger closed 4 years ago

drodger commented 4 years ago

This change allows running the module as a script from the command line with expected parameters.

Ex, after: pip install clear_lambda_storage

The script can be run as: python -m clear_lambda_storage --regions ap-east-1 ap-south-1

Details for how the setuptools creates this can be found here: https://setuptools.readthedocs.io/en/latest/setuptools.html#automatic-script-creation