Skip to content

calderalabs/terraform-aws-notify-slack

 
 

Repository files navigation

AWS Notify Slack Terraform module

This module creates SNS topic (or use existing one) and a AWS Lambda function which sends notifications to Slack using incoming webhooks API.

Start by setting up an incoming webhook integration in your Slack workspace.

Features

  • AWS Lambda runtime Python 3.6
  • Create new SNS topic or use existing one
  • Support plaintext and encrypted version of Slack webhook URL
  • Most of Slack message options are customizable
  • Support different types of SNS messages:

Usage

module "notify_slack" {
  source = "terraform-aws-modules/notify-slack/aws"
  
  sns_topic_name = "slack-topic"

  slack_webhook_url = "https://hooks.slack.com/services/AAA/BBB/CCC"
  slack_channel     = "aws-notification"
  slack_username    = "reporter"
}

Use existing SNS topic or create new

If you want to subscribe AWS Lambda Function created by this module to an existing SNS topic you should specify create_sns_topic = false as argument and specify name of existing SNS topic name in sns_topic_name.

Examples

  • notify-slack-simple - Creates SNS topic which sends messages to Slack channel.
  • notify-slack-kms - Creates SNS topic which sends messages to Slack channel (using KMS to encrypt Slack webhook URL).
  • cloudwatch-alerts-to-slack - End to end example which shows how to send AWS Cloudwatch alerts to Slack channel and use KMS to encrypt webhook URL.

Authors

Module managed by Anton Babenko.

License

Apache 2 Licensed. See LICENSE for full details.

About

Terraform module which creates SNS topic and Lambda function which sends notifications to Slack

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HCL 62.2%
  • Python 37.8%