← 返回首页
localstack-pro-samples/serverless-lambda-layers at master · localstack-samples/localstack-pro-samples · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Latest commit

 

History

History
 master
Top

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
View all files

README.md

Serverless Lambda Layers

Key Value
Services Lambda
Integrations Serverless Framework
Categories Serverless

Introduction

A demo application illustrating Lambda layers using LocalStack, deployed via the Serverless framework. Lambda layers allow you to package shared code and dependencies separately from your function code, enabling reuse across multiple functions.

Prerequisites

Check prerequisites

make check

Installation

make install

Start LocalStack

export LOCALSTACK_AUTH_TOKEN=<your-auth-token> make start

Run the application

make run

The script deploys the Lambda function with its layer via the Serverless framework and invokes it to verify the layer is loaded correctly.

You should see a success output:

{ "StatusCode": 200 }

Check the LocalStack container logs for the Lambda output:

>START RequestId: ba4efc87-7bf9-1705-9f45-8e84ba8eb071 Version: $LATEST > 2019-10-23T14:25:12.709Z ba4efc87-7bf9-1705-9f45-8e84ba8eb071 INFO This text should be printed in the Lambda > END RequestId: ba4efc87-7bf9-1705-9f45-8e84ba8eb071 > REPORT RequestId: ba4efc87-7bf9-1705-9f45-8e84ba8eb071 Duration: 22.65 ms Billed Duration: 100 ms Memory Size: 1536 MB Max Memory Used: 42 MB

License

This code is available under the Apache 2.0 license.

Footer

© 2026 GitHub, Inc.