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 build
compile typescript to jsyarn watch
watch for changes and compileyarn test
perform the jest unit testsyarn cdk deploy
deploy this stack to your default AWS account/regionyarn cdk diff
compare deployed stack with current stateyarn cdk synth
emits the synthesized CloudFormation template