SNS Topics & Subscriptions
SNS (Simple Notification Service) topics and subscriptions provide the notification infrastructure for the automated patching system. They enable real-time email alerts about maintenance window execution status and other automation events.
Overview
The SNS notification system consists of:
- Topics: Named channels that receive messages from event sources (EventBridge)
- Subscriptions: Email endpoints that receive messages published to topics
Configuration Structure
Topics
Topics are defined in the topics map in terraform.tfvars:
topics = {
patching-windows-sns-topic = {
name = "Patching-Windows-SNS-Topic"
}
patching-rhel-sns-topic = {
name = "Patching-RHEL-SNS-Topic"
}
}
Key: Terraform identifier for the topic (referenced by subscriptions and EventBridge targets)
name: The actual SNS topic name in AWS
Subscriptions
Subscriptions are defined in the subscriptions map in terraform.tfvars:
subscriptions = {
SapphireECSAAdmins = {
topic = "patching-windows-sns-topic"
protocol = "email"
endpoints = [
"[email protected]"
]
}
SapphireODBAdmins = {
topic = "patching-rhel-sns-topic"
protocol = "email"
endpoints = [
"[email protected]"
]
}
}
Key: Terraform identifier for the subscription
topic: References the topic key from the topics map
protocol: Communication protocol (typically email)
endpoints: List of email addresses to notify