Tuesday, May 28, 2024

AWS CDK V2 Synth Error when Bundling a NodejsFunction

 Problem:
AWS CDK version 2 synth error when bundling a NodejsFunction with somewhat complicated Typescript source code.

Error:
RangeError: Maximum call stack size exceeded

Solution:
Upgrade to a more recent version of npm package "esbuild". In this case, upgrading to version 0.19.12 resolve the issue even though this isn't the most recent version available. Other third party npm package constraints did not allow the latest version to be installed. npm i -D esbuild@0.19.12


Friday, May 3, 2024

AWS Lambda Typescript Ends Unexpectedly

 Problem:

An AWS Lambda in TypeScript ends unexpectedly with a CloudWatch success message (i.e. no errors logged).

Solution:

a. Increase Lambda memory size if low.

b. Check for missing await. Various console.log statements might log to CloudWatch but Lambda does not run to completion.