pip_builder

Pip-based Lambda layer builder implementation.

This module provides Lambda layer creation using pip’s --target installation method, supporting both local and containerized builds. It offers the simplest approach to layer creation since pip is universally available with Python installations.

Command Pattern Classes:

class aws_lambda_artifact_builder.layer.pip_builder.PipBasedLambdaLayerLocalBuilder(verbose: bool = True, printer: ~typing.Callable[[str], None] = <built-in function print>, path_pyproject_toml: ~pathlib.Path = REQ, credentials: ~aws_lambda_artifact_builder.layer.foundation.Credentials | None = None, skip_prompt: bool = False, _build_tool: str = LayerBuildToolEnum.pip, path_bin_pip: ~pathlib.Path = REQ)[source]

Command class for local pip-based Lambda layer builds (Internal API).

step_1_1_print_info()[source]

Display pip-specific build information.

step_3_execute_build()[source]

Perform pip-based Lambda layer build step.

step_3_1_run_pip_install()[source]

Execute pip install with –target flag and optional private repository authentication.

Installs from requirements.txt directly into Lambda’s python/ directory. Supports private repositories via –index-url with embedded credentials.

class aws_lambda_artifact_builder.layer.pip_builder.PipBasedLambdaLayerContainerBuilder(verbose: bool = True, printer: ~typing.Callable[[str], None] = <built-in function print>, path_pyproject_toml: ~pathlib.Path = REQ, py_ver_major: int = REQ, py_ver_minor: int = REQ, is_arm: bool = REQ, path_script: ~pathlib.Path = PosixPath('/home/docs/checkouts/readthedocs.org/user_builds/aws-lambda-artifact-builder/envs/latest/lib/python3.11/site-packages/aws_lambda_artifact_builder/layer/_build_lambda_layer_using_pip_in_container.py'), credentials: ~aws_lambda_artifact_builder.layer.foundation.Credentials | None = None)[source]

Command class for containerized pip-based Lambda layer builds.

step_1_preflight_check()[source]

Validate Docker environment and container build prerequisites.