[lambda] specify multiple folders as a single lambda asset
See original GitHub issueHello, Great framework, keep up the good work.
Right now in order to define a lambda function you need to set where the code resides, e.g. code: lambda.Code.asset('lambda')
. Sometimes you would like to define multiple folders, for example the actual code and node_modules
, although packing can be done as a preprocess step before actually running cdk deploy
, it would be cleaner to do it as part of the lambda configuration.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:27
- Comments:20 (7 by maintainers)
Top Results From Across the Web
Best practices for working with AWS Lambda functions
Initialize SDK clients and database connections outside of the function handler, and cache static assets locally in the /tmp directory. Subsequent invocations ...
Read more >Serverless Framework Python 1 yml and multiple directories ...
The issue is that the whole functions/* folder is picked up by each of the lambdas even if I have something like this...
Read more >5 Ways To Bundle a Lambda Function Within an AWS CDK ...
Bundle Lambda Function Before Publishing · Make sure the lambda/build folder is not ignored by NPM (this is usually configured in . ·...
Read more >How to Create an AWS Lambda Function with CDK ... - YouTube
In this video, I walk you through the steps to create an AWS Lambda function using CDK. I walk you through the process...
Read more >Packaging - Serverless Framework
The Serverless Framework documentation for AWS Lambda, API Gateway, ... To enable individual packaging set individually to true in the service or function ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I have a mono-repo and so I can’t just include the root of the project. I use
tsc
to compile code fromsrc/
->dist/
, fromts
tojs
. My node_modules exists at the root of the project and I don’t want to include all dependencies even.Something like this would be great:
Similar to the way gulp would let you include src files.
Right now I’m looking at adding a package.json into my func folder and running
npm i --production
but its a bit of a pain, I don’t have any mechanism for copying non-code files currently.still relevant