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


I have a node js project which used as a lambda authorizer in AWS. The node project structure will be like below


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 Answer

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?

answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions