lambda-packager¶
lambda-packager [OPTIONS] COMMAND [ARGS]...
Options
- -v, --verbosity <LVL>¶
Either CRITICAL, ERROR, WARNING, INFO or DEBUG
- -V, --version¶
Show the version and exit.
build¶
Bundles a group of python dependencies
lambda-packager build [OPTIONS] PROJECT_PATH OUTPUT_PATH
Options
- -pyv, --python-version <python_version>¶
Python version to target
- --region <region>¶
AWS region to target
- --ignore-unsupported-python¶
Allow Python versions that are unsupported
- -z, --zip-output <zip_output>¶
Output zip file in addition to directory
- --export-requirements <export_requirements>¶
export installed packages
- --ignore-packages, --no-ignore-packages¶
Ignore packages that are already present in the AWS Lambda Python runtime
- --update-dependencies, --no-update-dependencies¶
Update project dependency file with the ignored packages (ignored if not –ignore-packages)
- --compile-python, --no-compile-python¶
Compile the python bytecode
- --use-aws-pyarrow, --no-use-aws-pyarrow¶
Use AWS wrangler pyarrow (may result in smaller file size). Pulls from https://github.com/awslabs/aws-data-wrangler/releases/ until it finds a Lambda layer that includes the proper PyArrow version.
- --strip-tests, --no-strip-tests¶
Strip tests from the package
- --strip-libraries, --no-strip-libraries¶
Strip debugging symbols from libraries
- --strip-python, --no-strip-python¶
Strip python scripts from the package (requires –compile-python) (note, may need to set an ENV variable of PYTHONOPTIMIZE=2)
- --strip-other, --no-strip-other¶
Strip other files from the package (.pyx, .pyi, .pxi, .pxd, .c, .h, .cc)
- --compress-boto, --no-compress-boto¶
Compress boto3/botocore data files if present
- --ignore-additional <ignore_additional>¶
ignore additional dependencies using requirements file
- --ignore-from-glue <ignore_from_glue>¶
ignore dependencies already present in Glue Version
- Options:¶
2 | 3
- -O, --optimize-all¶
Turns on all size optimizations
Levels:1: strip-tests, strip-other, compress-boto2: ignore-packages, strip-libraries3: update-dependencies4: use-aws-pyarrow5: strip-python, compile-python
Arguments
- PROJECT_PATH¶
Required argument
- OUTPUT_PATH¶
Required argument
unify¶
Converts a bundled directory into a single wheel.
lambda-packager unify [OPTIONS] BUNDLE_PATH [OUTPUT_PATH]
Options
- --output-package-name <output_package_name>¶
- --output-package-version <output_package_version>¶
Arguments
- BUNDLE_PATH¶
Required argument
- OUTPUT_PATH¶
Optional argument