How to deploy dependencies package for Lambda function using CDK?

0

Hi, I have a lambda function with some package dependencies. I am using AWS Lambda construct library to deploy the lambda function using AWS CDK with TypeScript. Please suggest me the proper way to deploy these package dependencies for my lambda function through CDK.

Thank you!!

1개 답변
0

Hi, the right to do that is to use Lambda Layers: https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html

A layer is a .zip file archive that can contain additional code or data. A layer can 
contain libraries, a custom runtime, data, or configuration files. Layers promote 
code sharing and separation of responsibilities so that you can iterate faster on 
writing business logic.

You may also want to read this post; https://aws.amazon.com/blogs/compute/using-lambda-layers-to-simplify-your-development-process/

It will allow you to cleanly separate your code from its dependencies in terms of deployments, etc.

Best,

Didier

profile pictureAWS
전문가
답변함 9달 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠