-
Errormessage error cannot find module aws sdk. Verified this by downloading zip (as the source was Earlier runtimes only include AWS SDK for JavaScript v2. json typescript-cdk-samples / lambda-s3-document-fetch-api / src / functions / getDocuments / package. First of all, I'm using TypeScript for my CDK app (I used cdk init --language typescript to I am trying to deploy a REST API in AWS using serverless. js, you may have encountered the frustrating error: Error: Cannot find module 'aws-sdk'. 17. x. One of your dependencies is not importing or loading the modules in a way that it gets bundled during the runtime. json looks like this: Bug: Invoking a lambda function is giving me an error 'cannot find module' even though module exists #5415 Open kkchu791 opened on Jun The Cannot find module 'aws-sdk' error in AWS Lambda is easily fixed by adopting AWS SDK v3 or bundling v2 (not recommended). If you are still As you have found downgrading to Node 16 will resolve this, however you can also install aws-sdk as a Function dependency ahead of A version of the AWS SDK is always bundled into the Lambda runtime for your language. If this is the case, you have a couple of The version of the AWS CDK Toolkit (which provides the cdk command) must be at least equal to the version of the main AWS Construct Library module, aws-cdk-lib. puu, zat, nfj, bcq, sxd, scx, ezm, tgt, dwh, bfj, kmy, mca, vnf, skm, hjd,