You should explore the contents of this project. It demonstrates a CDK app with an instance of a stack (CdkServerlessGetStartedStack)
which contains a Lambda function which is exposed using an API
gateway through which we can access the website defined in lambda function
Also created a sample Dynamodb if lambda function wants to save something in the database. For this run , database will be empty.
The cdk.json file tells the CDK Toolkit how to execute your app.
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