ACloudGuru / serverless-plugin-aws-alerts

A Serverless Framework plugin that creates CloudWatch alarms for functions.
MIT License
531 stars 149 forks source link

Alarm on latest version of the lambda only #217

Open mhihasan opened 2 years ago

mhihasan commented 2 years ago

This is a Feature Proposal

Description

I would like to set alarms on the latest version of the lambda function only for the purpose of blue-green deployment.

Use case

I would like to use blue-green deployment. While deploying, AWS CodeDeploy will look for errors on the ongoing version(latest) only. At current settings, if there is an error that occurs on that function, the deployment rollbacks which is not the case I want. Because existing lambda version might be throwing errors, I want to solve that with the next release.

Additional config

Config might look like this:

alerts:
   latestVersionOnly: true

Note

Note that, I have forked this repo and implemented the mentioned behavior and it is working as expected. Do you want to have that feature at this plugin?