Skip to main content

Module: sns-topic

Terraform module to provision SNS topic

Introduction

This module provides:

  • SNS topic creation
  • SNS topic policy
  • SNS topic subscriptions

It's possible to subscribe SQS as Dead Letter Queue.

Usage

Amazon Simple Notification Service (Amazon SNS) is a web service that coordinates and manages the delivery or sending of messages to subscribing endpoints or clients. SNS documentation

There are many ways SNS can be used. As an example we can imagine CloudWatch sending alerts to SNS, by using subscribers such notifications can be sent further to PagerDuty, OpsGenie or any other oncall management tool.

Examples

module "sns" {
source = "cloudposse/sns-topic/aws"
# Cloud Posse recommends pinning every module to a specific version
# version = "x.x.x"

attributes = var.attributes
name = var.name
namespace = var.namespace
stage = var.stage

subscribers = {
opsgenie = {
protocol = "https"
endpoint = "https://api.example.com/v1/"
endpoint_auto_confirms = true
}
}

sqs_dlq_enabled = false
}