Skip to content

devsuresh2005/lambda-with-custom-layer-sam-local

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Creating a Lambda function that utilizes a Custom Layer using NodeJS and Typescript and executing using SAM local

Complete Guide at https://medium.com/@devsuresh2005/creating-a-lambda-function-that-utilizes-a-custom-layer-using-nodejs-and-typescript-and-executing-2eb15de6269a

To build the layer

  • cd match-layer

  • npm install

  • tsc

Now the layer code should be built and available under nodejs/node_modules/math-layer directory and ready for linking to a lambda.

To build the lambda

  • cd hello-lambda

  • npm install

  • tsc

Now the lambda code should be build and available under dist directory and ready for incoking from SAM CLI.

To inoke the lambda

  • sam local start-api

Now you should be able to inoke the lambda from Postman using http://127.0.0.1:3000/hello-lambda-layer-test [POST] method.

Sample JSON payload: { "number1": 3, "number2": 5 }

image

Thanks.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published