upload

Lambda layer S3 upload — Step 3 of the layer workflow.

Uploads the packaged layer.zip to a staging location in S3 where the publish step can pick it up to create a Lambda layer version.

Why store manifest_md5 in S3 metadata?

The publish step needs to verify that the layer.zip sitting in S3 was actually built from the current dependency manifest on disk. Without this check, a stale zip from a previous build could be published by accident. By embedding the manifest MD5 at upload time and comparing it at publish time, we get a cheap consistency gate.

aws_lbd_art_builder_core.layer.upload.upload_layer_zip_to_s3(s3_client: S3Client, path_pyproject_toml: ~pathlib.Path, s3dir_lambda: S3Path, path_manifest: ~pathlib.Path, verbose: bool = True, printer: ~typing.Callable[[str], None] = <built-in function print>)[source]

Upload Lambda layer zip file to S3 staging location.

Parameters:
  • s3_client – Configured boto3 S3 client

  • path_pyproject_toml – Path to pyproject.toml (determines project root and zip location)

  • s3dir_lambda – S3 directory path where Lambda artifacts are stored

  • path_manifest – Path to the dependency manifest file (e.g. requirements.txt, uv.lock)

  • verbose – If True, shows detailed upload progress

  • printer – Function to handle progress messages