serverless-alarm-notification-plugin
v1.0.0
Published
This Serverless plugin deploys CloudFormation Stack with resources required to send customized notification message to specified webhook endpoint for configured CloudWatch alarms.
Downloads
3
Readme
📋 Serverless Alarm Notification Plugin
This Serverless plugin deploys CloudFormation Stack with resources required to send customized notification message to specified webhook endpoint for configured CloudWatch alarms.
Installation
$ yarn add -D serverless-alarm-notification-plugin
Usage
Add the following configuration to your serverless.yml
.
plugins:
- serverless-alarm-notification-plugin
custom:
alarmNotification:
name: alarm-notification
webhookUrl: [YOUR_WEBHOOK_ENDPOINT]
stages:
- staging
- production
Run yarn sls deploy
to deploy your serverless stack with this stack.
Properties
- name: Optional (Default to
alarm-notification
. This will be used as part of your CloudFormation stack name.) - webhookUrl: Required (Webhook endpoint url to send notification to)
Note: Camelcase version of property name
is used to prefix all stack resource logical ids and output variables.
Example Serverless Configuration
service: awesome-service
frameworkVersion: ">2"
provider:
name: aws
stage: dev
runtime: nodejs14.x
region: us-east-1
plugins:
- serverless-alarm-notification-plugin
custom:
alarmNotification:
name: alarm-notification
webhookUrl: [webhook-endpoint-url]
As part of running sls deploy
, a CloudFormation stack awesome-service-alarm-notification
will be created, which includes a Lambda function awesome-service-send-notification-dev
, which can be used to attach to a SNS topic to send alarm notifications.