An example project using API Gateway and Lambda with weighted routing to the latest function deployed. This will send a small portion of traffic to the new version and rollback if errors occur using CloudWatch Alarms.
Blog Post: https://dev.to/ryands17/canary-deployment-of-lambdas-using-cdk-pipelines-1l0b
The cdk.json file tells the CDK Toolkit how to execute your app.
yarn buildcompile typescript to jsyarn watchwatch for changes and compileyarn testperform the jest unit testsyarn cdk deploydeploy this stack to your default AWS account/regionyarn cdk diffcompare deployed stack with current stateyarn cdk synthemits the synthesized CloudFormation template