This project provides a rough framework for automating the AWS Lambda layer build process.
This project requires
- AWS Account with an S3 bucket for temporary ZIP storage
- AWS CLI (with access keys configured for your AWS account)
- Docker
- Python >= 2.7,3.5
- After cloning the repo, copy the
vars.txt.example
file tovars.txt
- Edit
vars.txt
to provide an S3 bucket name - Optionally provide a custom default layer name
- Optionally provide
pip
arguments for layers (based on layer name) - Create files under
requirements
for each layer you wish to build (e.g.requirements/boto3.txt
may listboto3
) - Run
make
thenmake publish
to build your default layer - Run
LAYER_NAME=other-layer make
or (export LAYER_NAME=other-layer
thenmake
) to build additional layers, and publish as desired - Verify that your new Lambda layer is available via the console, or by running
aws lambda list-layers