Skip to content

nullstone-modules/aws-slack-notification-channel

Repository files navigation

aws-slack-notification-channel

Creates a Notification channel that targets a Slack channel. This module provisions an SNS topic and an AWS Chatbot Slack channel configuration so that CloudWatch metric alarms can deliver notifications directly to a Slack channel.

How it works

  1. An SNS topic is created as the notification target.
  2. AWS Chatbot subscribes to the SNS topic and forwards messages to a Slack channel.
  3. Use the notification_arn output as the alarm_actions on any aws_cloudwatch_metric_alarm.

Slack Setup

1. Authorize AWS Chatbot in your Slack workspace

Before using this module, you must authorize the AWS Chatbot app in your Slack workspace:

  1. Open the AWS Chatbot console.
  2. Choose Slack and click Configure new client.
  3. Authorize the AWS Chatbot app for your Slack workspace.
  4. Note the Workspace ID shown after authorization — use this as slack_workspace.

2. Get the Slack channel ID

  1. In Slack, right-click the target channel and select Copy link.
  2. The channel ID is the last segment of the URL (e.g., C0XXXXXXX).
  3. Use this as the channel_name variable.

Variables

Name Description
slack_workspace Slack workspace ID (found in workspace URL or AWS Chatbot console).
channel_name Slack channel ID to send notifications to.

Outputs

Name Description
notification_arn SNS topic ARN to use as an alarm action in aws_cloudwatch_metric_alarm.

About

Creates a Notification channel that targets a Slack channel

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors