If you've ever needed to build a Lambda layer quickly and easily, this tool is for you.
Copy the make-layer
file to a location on your path, e.g. cp make-layer /usr/local/bin/
.
Download and install with a single command by copying and pasting the following into a terminal:
INSTALL_LOC=/usr/local/bin/make-layer; curl https://raw.githubusercontent.com/aws-samples/aws-lambda-layer-builder/main/make-layer > $INSTALL_LOC; chmod +x $INSTALL_LOC
This tool can either take a list of packages to include in the layer, or a package manifest file valid for the specified runtime. It assumes the AWS CLI is already properly configured.
Run make-layer
without parameters for full usage instructions.
make-layer NAME RUNTIME MANIFEST
NAME
is a valid Lambda layer name (letters, numbers, hyphens, and underscores)RUNTIME
is a valid Lambda runtime identifier (e.g.nodejs14.x
,python3.8
)MANIFEST
is the full path and filename of a valid manifest file. The following types are supported:- Node.js:
package.json
- Python:
requirements.txt
- Node.js:
If the manifest file is not found the parameters are presumed to be explicit package names.
make-layer NAME RUNTIME PACKAGE_1 [PACKAGE_2] ...
PACKAGE_1
,PACKAGE_2
, etc. are the packages to be installed.
- Add parameter for AWS profile to use (currently uses default, or honors AWS_PROFILE)
- Add support for additional runtimes
Pull requests are welcomed. Please review the Contributing Guidelines and the Code of Conduct.
See CONTRIBUTING for more information.
- Drew Mullen ([email protected])
- Jud Neer ([email protected])
This project is licensed under the MIT-0 License. See the LICENSE file for details.