"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 Antwort
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
beantwortet vor 2 Jahren

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen