dav009 / serverless-aws-alarms-notifier

Cloudwatch alarms on Slack with no effort via Serverless Framework

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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


Languages

Language:Python 97.5%Language:Shell 2.5%