Simple script to deploy Python code to AWS Lambda.
Automatically zips the current directory and the specified module directory (hopefully you used a virtualenv!), then uploads it to the specified lambda function.
- Install and configure the AWS CLI with your account's login credentials
- Set up lambda-deploy virtualenv, then
pip install -r requirements.txt
- In
deploy.py, changeMODULE_DIRandLAMBDA_FUNCTION_NAMEto correspond to your Python module directory (probably in~/.virtualenvssomewhere) and the AWS Lambda function's name, respectively - Navigate to the deployment directory
python /path/to/deploy.py