O'Reilly logo

DevOps for Serverless Applications by Shashikant Bangera

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required