Skip to content

AWS Lambda layer building made easy for Python & NodeJS runtimes. Create & publish the layers with a single command.

License

Notifications You must be signed in to change notification settings

srcecde/aws-lambda-layer-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

AWS Lambda Layer Creator

Python & NodeJS lambda layer creation made easy!

Prerequisites

  • AWS CLI (Install & Configure)
  • Docker (Install)

Installation

Clone the repository or simply download the create-layer.sh and execute below commands

cp create-layer.sh /usr/local/bin/create-layer
chmod +x /usr/local/bin/create-layer

OR (Follow one-click install)

SCRIPT_INSTALL_LOC=/usr/local/bin/create-layer; curl https://raw.githubusercontent.com/srcecde/aws-lambda-layer-creator/main/create-layer.sh > $SCRIPT_INSTALL_LOC; chmod +x $SCRIPT_INSTALL_LOC

Usage

Python

To create the layer the command should be in the specified format.

create-layer layer-name python-runtime package1 [package2,…]
  • create-layer - Command to invoke the script to create lambda layer
  • layer-name - Name of the lambda layer (Please make sure to follow the lambda layer naming convention)
  • python-runtime - Python runtime
  • package - Name of the package, library that you want to install

Supported python runtime

  • python3.6
  • python3.7
  • python3.8
  • python3.9
  • python3.10
  • python3.11
  • python3.12

Example

create-layer pandas-numpy-layer python3.12 numpy pandas

Node JS

To create the layer the command should be in the specified format.

create-layer layer-name nodejs-runtime package1 [package2,…]
  • create-layer - Command to invoke the script to create lambda layer
  • layer-name - Name of the lambda layer (Please make sure to follow the lambda layer naming convention)
  • nodejs-runtime - NodeJS runtime
  • package - Name of the package, library that you want to install

Supported Node JS runtime

  • nodejs10.x
  • nodejs12.x
  • nodejs14.x
  • nodejs16.x
  • nodejs18.x
  • nodejs20.x

Example

create-layer request-moment-layer nodejs14.x request moment

About

AWS Lambda layer building made easy for Python & NodeJS runtimes. Create & publish the layers with a single command.

Topics

Resources

License

Stars

Watchers

Forks

Languages