The Using AWS Lambda with Amazon S3 tutorial done with AWS CDK.
Uses the NodejsFunction to bundle the Lambda code:
aws-sdkis not included in the bundlesharp, which uses native dependencies, is installed in thenode_modulesfolder
npm run buildcompile typescript to jsnpm run watchwatch for changes and compilenpm run testperform the jest unit testscdk deploydeploy this stack to your default AWS account/regioncdk diffcompare deployed stack with current statecdk synthemits the synthesized CloudFormation template