Notes on building a small application (two lambdas and a step function state machine) with the CDK (TypeScript).
cdk init
can only be run in an empty directory. The name of this directory is used throughout the generated code, notably as the name of the generated stack. It seems like the intention is to use the root directory of the project for the CDK code as well as any other source code. I preferred to separate the CDK code from Scala, so I put it into its own subdirectory that was ultimately named cdk
, but when running cdk init
I temporarily gave it the same name as my project so the generated stack name made sense (e.g. MyProjectStack
instead of CdkStack
).
CDK applications are made by composing constructs. A construct is a representation of an AWS Resource at varying levels of abstraction. Some are auto-generated and therefore as low-level as CloudFormation itself, others provide a