Skip to content

antonbabenko/repro-lambda

Repository files navigation

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.

Usage - day-to-day (USAGE.md)

Using repro-lambda once the infrastructure exists.

Example - runnable (examples/complete/)

A self-contained consumer setup: manifest, catalog, and Terraform using terraform-aws-modules/lambda/aws.

License

MIT - see LICENSE.

Author

Anton Babenko - @antonbabenko on Twitter, antonbabenko on LinkedIn.

About

Build reproducible AWS Lambda packages outside Terraform, optimized for terraform-aws-lambda by serverless.tf.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Contributors