Skip to content

Cloudwatch alarms on Slack with no effort via Serverless Framework

Notifications You must be signed in to change notification settings

dav009/serverless-aws-alarms-notifier

Repository files navigation

Serverless Cloudwatch alerts 2 Slack

Cloudwatch alerts on slack.

Usually glueing Cloudwatch alerts to Slack requires a Lambda function, requires you to know how to parse the SNS, and specify a channel.

This projects creates a lambda function that knows how to send cloudwatch-alert-SNSs to Slack. You can use this project to handle alerts for multiple projects.

Usage

  • do serverless install -u https://github.com/dav009/serverless-aws-alarms-notifier
  • Go to AWS ec2's parameter store and add a new parameter containing your slack token
  • Edit serverless.yml replacing parameter_name_where_slack_token_is_store for the parameter name on ec2 parameter store
  • Deploy
    • run sh bootstrap.sh (just neded the first time..)
    • run sls deploy
  • Use the SNS generated by this project when creating your Cloudwatch alerts (cloudwatch-alerts-sns).
    • When creating your Cloudwatch alarm add channel:XX to the alarm description, replace XX with a slack channel

Note: make sure the role of the generated lambda function has access to sms:xx and to the KMS key you used to encrypt your parameter.

About

Cloudwatch alarms on Slack with no effort via Serverless Framework

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published