Build AWS Lambda Layers as .zip files directly in Docker.
This image uses Amazon Linux 2023 with Python 3.13.x and produces layers compatible with the AWS Lambda Python 3.13 runtime.
This tool builds a Lambda-compatible layer for a single Python package per run.
It automatically installs the requested package inside the correct folder structure:
python/lib/python3.13/site-packages/
and compresses it into a zip suitable for direct upload as a Lambda Layer.
Run the Docker container for any package you need:
mkdir -p out
docker run --rm --platform=linux/amd64 -v "$(pwd)/out:/package" highpoints/aws-lambda-layer-zip-builder:py313 numpyThis produces a layer zip:
out/layers/numpy3-13.zip
Attach this file as a Lambda Layer (runtime Python 3.13).
NumPy layer
docker run --rm --platform=linux/amd64 -v "$(pwd)/out:/package" highpoints/aws-lambda-layer-zip-builder:py313 numpyEach command produces a zip named like:
<package>3-13.zip
which complies with the AWS Lambda Layer filename restriction (only one period allowed).
- Base OS: Amazon Linux 2023
- Python version: 3.13.x
- Compatible Lambda runtime:
python3.13 - Stripping of
.sobinaries has been disabled to ensure native library compatibility. - Tested with:
- numpy
Prebuilt image:
https://hub.docker.com/repository/docker/highpoints/aws-lambda-layer-zip-builder
Happy Coding 🎉