[{"data":1,"prerenderedAt":51},["ShallowReactive",2],{"pattern-lambda-node-esm-cdk":3},{"id":4,"title":5,"architectureURL":6,"cleanup":7,"contributors":10,"deploy":12,"description":15,"extension":16,"framework":17,"gitHub":18,"highlight":6,"introBox":24,"language":29,"level":30,"meta":31,"patternArch":32,"resources":37,"s3URL":6,"services":6,"stem":46,"testing":47,"videoId":6,"__hash__":50},"patterns\u002Fpatterns\u002Flambda-node-esm-cdk.json","AWS Lambda function for Node.js using TypeScript with ESM and ESBuild configured",null,{"text":8},[9],"Delete the stack: \u003Ccode>cdk delete\u003C\u002Fcode>.",[11],"content\u002Fcontributors\u002Fluca-mezzalira.json",{"text":13},[14],"cdk deploy","Create a Lambda function for Node.js with ESM modules configured and ESBuild bundle set up","json","AWS CDK",{"template":19},{"repoURL":20,"templateURL":21,"projectFolder":22,"templateFile":23},"https:\u002F\u002Fgithub.com\u002Faws-samples\u002Fserverless-patterns\u002Ftree\u002Fmain\u002Flambda-node-esm-cdk","serverless-patterns\u002Flambda-node-esm-cdk","lambda-node-esm-cdk","cdk\u002Fnode-esm-stack.ts",{"headline":25,"text":26},"How it works",[27,28],"This sample project demonstrates how to use ES modules with a Lambda function using TypeScript, ESBuild and CDK.","This template has the bundle properly configured in CDK to use ES modules in Node.js for leveraging dynamic imports or top-level await for instance.","Node.js","200",{},{"icon1":33},{"x":34,"y":34,"service":35,"label":36},50,"lambda","AWS Lambda",{"headline":38,"bullets":39},"Additional resources",[40,43],{"text":41,"link":42},"Working with the AWS CDK in TypeScript","https:\u002F\u002Fdocs.aws.amazon.com\u002Fcdk\u002Fv2\u002Fguide\u002Fwork-with-cdk-typescript.html",{"text":44,"link":45},"Using Node.js ES modules and top-level await in AWS Lambda","https:\u002F\u002Faws.amazon.com\u002Fblogs\u002Fcompute\u002Fusing-node-js-es-modules-and-top-level-await-in-aws-lambda\u002F","patterns\u002Flambda-node-esm-cdk",{"text":48},[49],"See the GitHub repo for detailed testing instructions.","XqSDNoQ_6e-EI5G3CQICeKZkqvzFm8pJo87smgNTrxo",1778846886417]