Lambda development has started to improve. This boilerplate demonstrates how to combine CDK and SAM to develop and deploy Typescript lambda code
-
npm run cdk:synth
run this to update the build -
npm run sam:run
run locally -
npm run cdk:deploy
-
npm run cdk:destroy
npm run build
compile typescript to jsnpm run watch
watch for changes and compilenpm run test
perform the jest unit testscdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
Useful reference can be found here