Issue
I have a node js project which used as a lambda authorizer in AWS. The node project structure will be like below
/authorizer
/lib
-index.js
-package.json
-node_modules
-package.lock.json
I am creating a CDK in typescript to create the lambda function as shown below. I have given the "entry" value as the path of "index.js".
But I am getting this below error after that line
Can you guide me, what exactly missing here? any issue with bundling?
My actual requirement is, that I need to bundle the node_modules folder when I zip and deploy the same via YAML
Solution
In case package esbuild
is not present in your local env AWS CDK tries to use docker. See:
https://docs.aws.amazon.com/cdk/api/v1/docs/aws-lambda-nodejs-readme.html#local-bundling
Answered By - Lasek
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.