"Error - ENOENT" while creating a lambda function via cdk

0

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".

Enter image description here

But I am getting this below error after that line Enter image description here

Can you guide me, what exactly missing here? any issue with bundling?

1 réponse
0

Reading the docs https://docs.aws.amazon.com/cdk/api/v1/docs/aws-lambda-nodejs-readme.html#local-bundling as if esbuild is not available it will try to use docker to build. Which looks to be why the error is coming up?

AWS
répondu il y a 2 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions