Let's pack things up.
This is a tool for packaging and building lambda functions in a live-like environment. Just like it's built upon the lambci/docker-lambda, which means it's as close as one can possibly come to the native lambda environment.
Step by step:
requirements.txt filelambda-packer while mounting in the code to /app/src and an output folder to /packages where the zipped package will eventually land. Pass in the name of the package as the command (parameter after the docker image). To use pypi repository, pass in the variables PYPI_USERNAME and PYPI_PASSWORDIn code please!
# The application code lies in `/handlers` (together with the requirements.txt)
# The package will land in ${PWD}/packages and it will be called custom_package_name.zip
# To run the below script, the comments must be removed
docker run --rm -it \
-v "${PWD}/example_handlers:/app/src" \ # Path to the code
-v "${PWD}/packages:/packages" \ # Path to package output
-e PYPI_USERNAME -e PYPI_PASSWORD \ # pypi credentials
lambda-packer \
custom_package_name.zip # Name of the package
Content type
Image
Digest
Size
755.5 MB
Last updated
over 6 years ago
docker pull akino1976/lambda-packer