Making sure the deployment works fine

Our function deployed without any hassle, but how do we ensure that whole system is behaving correctly? To ensure everything is working fine, we can provide CodeDeploy with a list of variables to track during the deployment process, then cancel it, and shift all the traffic to the old version if the ALARM is triggered. With serverless, we can set the alarm using another plugin. Let's have a look at how to do this: 

  1. Update the serverless.yml to set the alarm, as shown in the following code: 
service: my-canary-deploymentprovider: name: aws runtime: nodejs6.10plugins:    - serverless-plugin-aws-alerts    - serverless-plugin-canary-deploymentscustom:    alerts:        dashboards: truefunctions:    hello: handler: handler.hello ...

Get DevOps for Serverless Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.