repro-lambda
Build reproducible AWS Lambda packages outside Terraform, optimized for terraform-aws-lambda by serverless.tf.
Produces byte-identical zip files across local dev (macOS) and CI (Linux),
uploads to S3 by content-hash key, and lets Terraform read s3_existing_package
instead of building during terraform plan/apply.
Install
pip install repro-lambda
Quick start
repro-lambda lock # regenerate per-arch requirement + source locks
repro-lambda build --bucket <bucket> # build all lambdas in lambdas.toml, upload to S3
repro-lambda build --verify --dry-run # two-pass byte-reproducibility check (no upload)
repro-lambda promote \
--dev-bucket <dev> --prod-bucket <prod> # copy dev -> prod by content sha (no rebuild)
--bucket (or REPRO_LAMBDA_BUCKET) is required for a real build; add
--dry-run to build without uploading. There is no init command yet (the
subcommand is currently a stub).
Documentation
What each document covers, by section:
Setup - one-time AWS provisioning (SETUP.md)
Provision the supporting infrastructure once per AWS account and environment.
- Architecture - artifact buckets, key-level immutability, the content-hash model
- Terraform - per-account bootstrap - the buckets, the GitHub OIDC builder role, and outputs
- GitHub OIDC provider - declaring the shared per-account OIDC provider
- Next steps - where to go after provisioning
Usage - day-to-day (USAGE.md)
Using repro-lambda once the infrastructure exists.
- Source-repo CI workflow - wiring the reusable build workflow into CI/CD
- Per-Lambda manifest - the
lambdas.tomlfields- Per-lambda builder overrides - per-lambda base image and file filters
- Declarative sources - pinned external artifacts via
[[lambda.source]] - Terraform consumer (
s3_existing_package) - wiringterraform-aws-modules/lambda/awsto the built artifact - Smoke test - first-build verification and the clean migration plan diff
- Troubleshooting - upload 403s,
PreconditionFailed, noisy plans - Node.js (npm) Lambdas - npm packaging support
- Lambda@Edge example -
us-east-1artifacts for CloudFront - Caveats - npm workspaces, native deps, symlinks
Example - runnable (examples/complete/)
A self-contained consumer setup: manifest, catalog, and Terraform using
terraform-aws-modules/lambda/aws.
- What this example shows - files and layout
- The build-outside-Terraform flow - build, inspect the catalog, apply
- Expected plan diff - the
s3_key-only diff to expect
License
MIT - see LICENSE.
Author
Anton Babenko - @antonbabenko on Twitter, antonbabenko on LinkedIn.
Metadata
Release files for repro-lambda 0.8.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| repro_lambda-0.8.2.tar.gz | 208.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| repro_lambda-0.8.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 247.8 kB
Release files / repro_lambda-0.8.2.tar.gz
| Download URL | repro_lambda-0.8.2.tar.gz |
|---|---|
| Size | 208.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb6b9e0655027d28d3b24407ee111e97292a215c9d122ecf4e4126d9672c712c
|
|
BLAKE2b-256 checksum How to use checksums |
a97a373d4a3f87a09d9af370cce33632605b618f79acb40dd45907526ecdf033
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency logRelease files / repro_lambda-0.8.2-py3-none-any.whl
| Download URL | repro_lambda-0.8.2-py3-none-any.whl |
|---|---|
| Size | 39.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e216c18d874c6239ae98f5311be9eccb3f65834154ad81e1c92ec7f9718c09fe
|
|
BLAKE2b-256 checksum How to use checksums |
3cf1789ae45b7a6501b87e1b0e0d25cafe4d9f7b53ca651cebdf70858108f3a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 23, 2026.
Transparency log