Skip to content

JohnSesana/Lambda-Layers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Lambda Layers Repository

This repository contains AWS Lambda Layers that can be reused across multiple Lambda functions. Lambda Layers allow you to manage dependencies and share code more efficiently. This guide will explain how to create, package, and deploy your own Lambda Layer.

Table of Contents

Table of Contents

What is a Lambda Layer?

A Lambda Layer is an archive containing libraries, a custom runtime, or other dependencies that you can import into your Lambda functions. It allows you to share common code across multiple functions, reducing the package size and simplifying updates.

Prerequisites

  • Python: Use the same version as your lambda to avoid conflicts.
  • WSL or Linux: To use the bash commands for the layer zip creation. Some Windows systems have problems with it.
  • ZIP utility: The packaging process involves zipping files, so you need a tool to create ZIP archives (e.g., zip command on Linux/macOS, 7-Zip on Windows).

Step-by-Step Guide

1. Create the Layer Structure

Create a directory that will contain your layer code and its dependencies. The folder structure depends on the runtime of your Lambda function:

2. Create Folder

mkdir python
cd python

3. Install your library and check files

pip3 install pandas -t .
tree -L 1

4. Zip File

zip -r pandas_layer.zip .

5. Add zip file to your AWS Lambda Layers

ADD PRINT HERE

6. Connect your lambda with your layer

ADD PRINT HERE

About

Libraries to import for lambda layers

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published