I started with this highly useful but slightly outdated tutorial Create a Serverless Workflow.
I rewrote it in cdk.
Read my post on dev.to.
npm install
do this firstnpm run lint
check your stylenpm test
perform the jest unit testscdk bootstrap
the first time only to prep your environmentcdk deploy
deploy this stack to your default AWS account/regioncdk diff
compare deployed stack with current statecdk synth
emits the synthesized CloudFormation template
cdk synth --no-staging > template.yaml
to create the template for SAM.sam local invoke <FN name from template.yaml> -e ./inputs/<JSON input>
to run the function locally.