Welcome to aws_lbd_art_builder_uv Documentation
aws_lbd_art_builder_uv is the uv builder for aws_lbd_art_builder_core: it turns a project’s pyproject.toml and uv.lock into the python/ folder of an AWS Lambda layer, using uv.
It offers two builders:
UvLambdaLayerLocalBuilder: runs uv sync on the host. Fast, no Docker. Best for pure-Python dependencies.
UvLambdaLayerContainerBuilder: runs uv sync inside an AWS SAM build image, so packages with C extensions (numpy, pydantic-core, …) get Linux binaries for the target Python and architecture.
Both run four steps (Preflight Check → Prepare Environment → Execute Build → Finalize Artifacts) and leave the layer content in build/lambda/layer/artifacts/python/. Zipping, uploading, and publishing the layer come from aws_lbd_art_builder_core, re-exported here.
Features:
Reproducible builds: uv sync --frozen from the lock file, project itself never installed.
UvSyncOptions picks what goes into the layer: extras, dependency groups, and any other uv sync flag, checked when the object is built.
Private package indexes (e.g. AWS CodeArtifact) through Credentials.
validate_artifacts checks that every dependency landed in the layer, and optionally that its wheels target Linux.
Quick Look
Build a layer in a container, check it, then zip, upload, and publish it:
from pathlib import Path
import boto3
from s3pathlib.api import S3Path
import aws_lbd_art_builder_uv.api as aws_lbd_art_builder_uv
layer_api = aws_lbd_art_builder_uv.layer_api
path_pyproject_toml = Path("/path/to/my_app-project/pyproject.toml")
builder = layer_api.UvLambdaLayerContainerBuilder(
path_pyproject_toml=path_pyproject_toml,
py_ver_major=3,
py_ver_minor=12,
is_arm=False,
skip_prompt=True,
uv_sync_options=layer_api.UvSyncOptions(extras=["aws"]),
)
builder.run()
layer_api.validate_artifacts(
dir_python=builder.path_layout.dir_python,
path_pyproject_toml=path_pyproject_toml,
check_linux=True,
extras=["aws"],
)
boto_ses = boto3.Session()
s3dir_lambda = S3Path("s3://my-bucket/projects/my_app/lambda/")
layer_api.create_layer_zip_file(
dir_python=builder.path_layout.dir_python,
path_layer_zip=builder.path_layout.path_build_lambda_layer_zip,
)
layer_api.upload_layer_zip_to_s3(
s3_client=boto_ses.client("s3"),
path_pyproject_toml=path_pyproject_toml,
s3dir_lambda=s3dir_lambda,
path_manifest=path_pyproject_toml.parent / "uv.lock",
)
deployment = layer_api.LambdaLayerVersionPublisher(
path_pyproject_toml=path_pyproject_toml,
s3dir_lambda=s3dir_lambda,
path_manifest=path_pyproject_toml.parent / "uv.lock",
s3_client=boto_ses.client("s3"),
layer_name="my_app",
lambda_client=boto_ses.client("lambda"),
).run() # raises ValueError if uv.lock is unchanged since the last version
print(deployment.layer_version_arn)
Pass plain boto3 clients. S3 locations are s3pathlib 3.x S3Path objects. The project needs a .venv with the same Python minor version as the build (uv venv --python 3.12). Core’s LayerDeploymentWorkflow runs the same steps in one call with either builder.
Install
aws_lbd_art_builder_uv is released on PyPI and supports Python 3.11 to 3.14. It needs uv on PATH, and Docker for container builds. The base install builds and validates layers; uploading and publishing need an extra:
$ pip install aws-lbd-art-builder-uv # build and validate
$ pip install "aws-lbd-art-builder-uv[upload]" # + S3 upload (boto3, s3pathlib 3.x)
$ pip install "aws-lbd-art-builder-uv[publish]" # + publish Lambda layer versions
To upgrade to latest version:
$ pip install --upgrade "aws-lbd-art-builder-uv[publish]"
Upgrading from 0.x: 1.0.0 requires aws_lbd_art_builder_core 1.x, which moved to s3pathlib 3.x and no longer accepts a BotoSesManager as s3_client; see the release history.
Metadata
Release files for aws_lbd_art_builder_uv 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aws_lbd_art_builder_uv-1.0.0.tar.gz | 24.4 kB | Without provenance | Details for aws_lbd_art_builder_uv-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aws_lbd_art_builder_uv-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for aws_lbd_art_builder_uv-1.0.0-py3-none-any.whl |
Total release size: 50.5 kB
Release files / aws_lbd_art_builder_uv-1.0.0.tar.gz
| Download URL | aws_lbd_art_builder_uv-1.0.0.tar.gz |
|---|---|
| Size | 24.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e3130205da9f8b28ac8347e8a645346d3def4a75a391e1edc250d3f82dd9ad41
|
|
BLAKE2b-256 checksum How to use checksums |
2b833f3fa54767fcbe2ccd359caf3037b93e9c951f076f0c7b802a69236669b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / aws_lbd_art_builder_uv-1.0.0-py3-none-any.whl
| Download URL | aws_lbd_art_builder_uv-1.0.0-py3-none-any.whl |
|---|---|
| Size | 26.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f3b58c42167975df563b7a44bf17fe764e150f280256d93501b17347e5480f43
|
|
BLAKE2b-256 checksum How to use checksums |
ea4a1d74e4fcb9f5ffc58d23887d9ac2f15ce6cc6f968a927d690c1aaeee7b4b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.7 {"installer":{"name":"uv","version":"0.11.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for aws_lbd_art_builder_uv 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.