Login to your AWS account.
Open CloudShell from the top right hand side of AWS Management (it already has cdk command line tool installed):
Check if cdk tool is installed:
$ cdk
Bootstrap CDK environment (you need to do that only once per account, per region):
$ cdk bootstrap aws://*ACCOUNT-NUMBER*
/*REGION*
Clone serverless repo:
$ git clone https://github.com/aws-samples/serverless-patterns/ $ cd serverless-patterns/s3-lambda-dynamodb-cdk/cdk
Install AWS Construct Library for our typescript demo (for different CDK apps written we will use a different package manager):
$ npm install
(Optional) Generate a CloudFormation template based on our CDK code:
$ cdk synth
Deploy a CDK app (with a single stack):
$ cdk deploy
Destroy the CDK app.
$ cdk destroy
Video walkthrough of this setup:
More details about this demo:
More CDK examples/demos to play with: