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.
- An SNS topic is created as the notification target.
- AWS Chatbot subscribes to the SNS topic and forwards messages to a Slack channel.
- Use the
notification_arnoutput as thealarm_actionson anyaws_cloudwatch_metric_alarm.
Before using this module, you must authorize the AWS Chatbot app in your Slack workspace:
- Open the AWS Chatbot console.
- Choose Slack and click Configure new client.
- Authorize the AWS Chatbot app for your Slack workspace.
- Note the Workspace ID shown after authorization — use this as
slack_workspace.
- In Slack, right-click the target channel and select Copy link.
- The channel ID is the last segment of the URL (e.g.,
C0XXXXXXX). - Use this as the
channel_namevariable.
| Name | Description |
|---|---|
slack_workspace |
Slack workspace ID (found in workspace URL or AWS Chatbot console). |
channel_name |
Slack channel ID to send notifications to. |
| Name | Description |
|---|---|
notification_arn |
SNS topic ARN to use as an alarm action in aws_cloudwatch_metric_alarm. |