For this time, we will the
Canary10Percent5Minutes strategy, which means that traffic is shifted in two increments. In the first increment, only 10% of the traffic is shifted to the new Lambda version, and after 5 minutes, the remaining 90% is shifted. There are other deployment strategies you can choose in CodeDeploy:
sls_app_stack.py in your project and update
deployment_config attribute to new value.
aws_codedeploy.LambdaDeploymentGroup(self, 'DeploymentGroup', alias=alias, application=app, deployment_config=aws_codedeploy.LambdaDeploymentConfig.ALL_AT_ONCE )
aws_codedeploy.LambdaDeploymentGroup(self, 'DeploymentGroup', alias=alias, application=app, deployment_config=aws_codedeploy.LambdaDeploymentConfig.CANARY_10_PERCENT_5_MINUTES )
Commit the changes to update our pipeline.
cd ~/environment/sls-app git add . git commit -m "Add Canary deployments"