Packages your python lambdas.
Run the container like this to create a zip file for uploading to AWS lambda:
docker run \
-u "${EUID}" \ # <-- this makes sure the resulting zip file is owned by you (and not by root)
-v ${PWD}:/workdir \ # <-- this mounts your aws credentials inside the container's home dir
felixb/aws-lambda-packagerYou might want to add the following function to your .bashrc or similar to allow even easier usage:
function package_python_lambda() {
docker run \
--rm \
-u "${EUID}" \
-v ${PWD}:/workdir \
felixb/aws-lambda-packager
}Set LAMBDA_NAME environment variable to configure your output file name like this:
docker run -e LAMBDA_NAME=some-lambda ...- Your python code is located in your current working directory
- There is a requirements.txt file in your current working directory