Serverless Tip #11: Deploy with confidence with canary deployments
Canary deployments enable you to roll out new versions gradually, minimizing the blast radius if something goes wrong.
For example, during a deployment, you can route 10% of incoming traffic to the new version for a short period, say ten minutes.
After ten minutes, you can complete the deployment and route all traffic to the new version if everything looks okay.
If you instead see, for example, increased error rates or latency, you can stop the deployment and roll back to the previous version.
Sounds complicated to implement? The native integration between Lambda, CodeDeploy, and CloudFormation makes it easy.
SAM users are even luckier, requiring only a one-line change to the function(s) in the SAM template.