lambda-layer

Create AWS Lambda layers for your AWS Lambda python functions!

What are Lambda Layers?

Good question. Let’s ask the AWS documentation

You can configure your Lambda function to pull in additional code and content in the form of layers. A layer is a ZIP archive that contains libraries, a custom runtime, or other dependencies. With layers, you can use libraries in your function without needing to include them in your deployment package.

What is lambda-layer?

lambda-layer is a command-line application you can use to automate the creation of layers for your python Lambda functions.

Installation

Take a look at Installing the Library.

Running the CLI

lambda-layer features a command-line interface (CLI) based on Click. You can use the --help flag to get context help.

Getting Help

lambda-layer --help
Usage: lambda-layer [OPTIONS] COMMAND [ARGS]...

  Run lambda-layer.

Options:
  -v, --verbose  Enable verbose output.
  --help         Show this message and exit.

Commands:
  package  Create configured packages.
  version  Get the library version.
Creating Packages

Most of the time you’ll probably want to use the package subcommand.

lambda-layer package --help
Usage: lambda-layer package [OPTIONS]

  Create configured packages.

Options:
  -c, --config PATH
  --help             Show this message and exit.

Indices and tables