Skip to main content

CLI tool for creating and publishing AWS Lambda layers for Node.js and Python.

Project description

AWS Lambda Layer CLI Tool

A command-line tool for creating and publishing AWS Lambda layers for Node.js and Python.

Features

  • Create and publish Lambda layers for Node.js (npm) and Python (uv/pip)
  • Automatic version management and smart naming
  • Direct publishing to AWS with IAM credentials and region support
  • Support for multiple packages in a single layer

Installation

Package Managers (Recommended)

npm (Node.js)

npm i -g aws-lambda-layer-cli

uv (Python)

uv tool install aws-lambda-layer-cli

Requirements

  • System: Linux, macOS, or Windows (WSL recommended)
  • Tools: zip, aws-cli (for publishing), node (for Node.js layers), python (for Python layers)

Usage

aws-lambda-layer-cli <command> [options]

Commands

  • zip: Create a local zip file
  • publish: Create and publish a layer to AWS
  • completion: Generate shell completion scripts
  • uninstall: Uninstall the tool
  • help: Show help message

Options

Option Description
--nodejs, -n <pkgs> Create Node.js layer (comma-separated packages)
--python, -p <pkgs> Create Python layer (comma-separated packages)
--name Custom layer name
--description Layer description (publish only)
--profile AWS CLI profile (publish only)
--region AWS region (publish only)
--node-version Node.js version (default: 24)
--python-version Python version (default: 3.14)
--no-uv Use pip/venv instead of uv
-v, --version Show version

Examples

Node.js

# Create local zip with multiple packages
aws-lambda-layer-cli zip --nodejs express@4.18.2,axios --name my-layer

# Publish to AWS with specific profile and region
aws-lambda-layer-cli publish --nodejs lodash --profile prod --region us-east-1 --description "Utils"

Python

# Create local zip with specific python version
aws-lambda-layer-cli zip --python numpy==1.26.0,pandas --python-version 3.12

# Publish to AWS
aws-lambda-layer-cli publish --python requests --name web-layer

Shell Completion

Add to your shell config (~/.bashrc or ~/.zshrc):

# Bash
source <(aws-lambda-layer-cli completion --bash)

# Zsh
source <(aws-lambda-layer-cli completion --zsh)

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aws_lambda_layer_cli-2.0.2.tar.gz (21.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_lambda_layer_cli-2.0.2-py3-none-any.whl (26.1 kB view details)

Uploaded Python 3

File details

Details for the file aws_lambda_layer_cli-2.0.2.tar.gz.

File metadata

  • Download URL: aws_lambda_layer_cli-2.0.2.tar.gz
  • Upload date:
  • Size: 21.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for aws_lambda_layer_cli-2.0.2.tar.gz
Algorithm Hash digest
SHA256 61a1b7fe40db5df3716fed15cfb34d399ce85f85da5cdd3d0579747f4009b26c
MD5 185b5de76dd6dd687b9f3a6e371502c4
BLAKE2b-256 1dd4e8e72400cb452de69cae6014264bf40687367d190f521cd3c618bb9375d7

See more details on using hashes here.

File details

Details for the file aws_lambda_layer_cli-2.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for aws_lambda_layer_cli-2.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b2fdbef42dbcd36d0f325c70b32a895f39e19df51cd95ea118803867613a145c
MD5 f401cbf9cb39ec2fcc7f8b3b94250bb9
BLAKE2b-256 bcf80712f79a92ad84bc8a5a0912e612211c7efb30f709ab93e265e1472d4394

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page