2.2 Notification Architecture & Alarm Invocation

Key Takeaways

  • CloudWatch alarms strictly require Amazon SNS Standard topics as alarm action destinations; SNS FIFO topics are not supported for CloudWatch alarm notifications.
  • SNS Standard topics enable the fan-out pattern to simultaneously broadcast alerts to Amazon SQS Standard queues, AWS Lambda functions, HTTPS webhooks, SMS, and email endpoints; SQS FIFO queues can only subscribe to an SNS FIFO topic.
  • SNS topic resource-based access policies must explicitly grant the cloudwatch.amazonaws.com service principal permission to perform sns:Publish, restricted by aws:SourceArn or aws:SourceAccount to prevent confused deputy exploits.
  • When an SNS topic is encrypted using AWS KMS, customer managed keys (CMKs) must be used instead of the default aws/sns key, and the KMS key policy must grant kms:GenerateDataKey* and kms:Decrypt permissions to cloudwatch.amazonaws.com.
  • SNS subscription filter policies evaluate message attributes to deliver alerts selectively to appropriate channels (e.g., critical alerts to PagerDuty webhooks, warning alerts to Slack), while subscription dead-letter queues (DLQs) capture undelivered notifications after retry exhaustion.
Last updated: September 2026

2.2 Notification Architecture & Alarm Invocation

Amazon Simple Notification Service (Amazon SNS) serves as the primary notification and alert-routing backbone for AWS operational monitoring. When Amazon CloudWatch alarms detect threshold violations or anomaly band breaches, they invoke automated actions by publishing messages to Amazon SNS topics. From there, SNS fans out notifications to diverse human and automated endpoints. For CloudOps engineers preparing for the SOA-C03 exam, deep knowledge of SNS topic types, resource access policies, KMS encryption configurations, delivery retry mechanisms, subscription filter policies, and dead-letter queues (DLQs) is essential.

Amazon SNS Topic Architecture: Standard vs. FIFO

Amazon SNS supports two distinct topic types designed for different architectural workloads:

Architectural DimensionSNS Standard TopicSNS FIFO Topic
Message OrderingBest-effort message orderingStrict FIFO (First-In, First-Out) ordering
DeduplicationAt-least-once delivery (duplicates possible)Exactly-once delivery via Message Deduplication ID
Throughput CapacityNearly unlimited messages per secondUp to 3,000 messages/sec (or 30,000/sec with high throughput mode)
Supported SubscribersSQS Standard queues, Lambda, HTTP/S, Email, SMS, mobile push (SQS FIFO queues cannot subscribe to a Standard topic)SQS FIFO queues, plus SQS Standard queues since September 2023
CloudWatch Alarm SupportFully supported as alarm actionsNot supported as CloudWatch alarm targets

A critical exam distinction is that CloudWatch alarms cannot publish actions directly to SNS FIFO topics. If an alarm action specifies an SNS FIFO topic ARN, the CloudWatch alarm configuration will fail validation. Therefore, all operational alert-routing topologies rely on SNS Standard topics.

Standard topics utilize the asynchronous fan-out pattern. A single alarm publication to an SNS topic can simultaneously broadcast messages across thousands of heterogeneous subscriber protocols:

  • Amazon SQS Queues: Buffering incident records for asynchronous processing by backend ticketing systems.
  • AWS Lambda Functions: Executing custom remediation scripts, querying CMDBs, or updating incident dashboards.
  • HTTPS Webhooks: Forwarding alert payloads to incident management platforms like PagerDuty, Opsgenie, or Slack/Microsoft Teams gateways.
  • Email (SMTP) & SMS: Delivering direct text notifications to on-call system administrators.

Security, Access Control & KMS Encryption

Because Amazon SNS topics are communication gateways, their access must be strictly governed by resource-based SNS Topic Access Policies. By default, only the topic owner can publish messages. When a CloudWatch alarm triggers, the CloudWatch service publishes to the SNS topic on the user's behalf.

To allow CloudWatch alarms to publish to an SNS topic without exposing the topic to unauthorized third parties or falling victim to the confused deputy problem, the topic policy must explicitly permit the cloudwatch.amazonaws.com service principal, restricted by the aws:SourceArn or aws:SourceAccount condition:

{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Sid": "AllowCloudWatchAlarmsToPublish",
      "Effect": "Allow",
      "Principal": {
        "Service": "cloudwatch.amazonaws.com"
      },
      "Action": "sns:Publish",
      "Resource": "arn:aws:sns:us-east-1:123456789012:cloudops-alarms-topic",
      "Condition": {
        "ArnLike": {
          "aws:SourceArn": "arn:aws:cloudwatch:us-east-1:123456789012:alarm:*"
        }
      }
    }
  ]
}

Server-Side Encryption (SSE) with AWS KMS

Enterprise security standards often require server-side encryption at rest for SNS topics. SNS integrates with AWS Key Management Service (KMS) using customer managed keys (CMK) or AWS managed keys (aws/sns).

A frequent scenario tested on the CloudOps exam involves CloudWatch alarms failing to deliver notifications to encrypted SNS topics. When an SNS topic is encrypted with the default AWS managed key (aws/sns), CloudWatch alarms cannot publish to it. This occurs because the default aws/sns KMS key policy cannot be modified to grant permissions to external service principals like cloudwatch.amazonaws.com.

To successfully publish alarm notifications to an encrypted SNS topic, organizations must use a customer managed KMS key (CMK) and update its key policy to explicitly grant the cloudwatch.amazonaws.com service principal permissions to generate data keys and decrypt them:

{
  "Sid": "AllowCloudWatchKMSAccess",
  "Effect": "Allow",
  "Principal": {
    "Service": "cloudwatch.amazonaws.com"
  },
  "Action": [
    "kms:GenerateDataKey*",
    "kms:Decrypt"
  ],
  "Resource": "*",
  "Condition": {
    "ArnLike": {
      "aws:SourceArn": "arn:aws:cloudwatch:us-east-1:123456789012:alarm:*"
    }
  }
}

Delivery Retries, Dead-Letter Queues (DLQs) & Message Filtering

When SNS attempts to deliver an alarm message to an HTTPS endpoint or webhook, network partitions or target downtime may cause delivery failures. SNS manages transient failures through configurable delivery retry policies.

For HTTP/S endpoints, SNS executes a four-phase retry protocol:

  1. Immediate Retries: Attempts delivery immediately without delay.
  2. Linear Backoff: Retries at steady, short intervals.
  3. Exponential Backoff: Gradually doubles retry wait times.
  4. Geometric Backoff: Applies a multiplier to delay intervals until the maximum retry limit (up to 100 attempts over several hours or days) is reached.

If an endpoint remains unreachable after exhausting all retries, the message is permanently dropped unless a Dead-Letter Queue (DLQ) is attached. In Amazon SNS, DLQs are Amazon SQS queues attached directly to specific subscriptions, rather than to the topic itself. If a subscriber webhook fails, SNS offloads the failed message, headers, error codes, and delivery timestamps to the SQS DLQ for diagnostic analysis and replay.

Message Filtering with Subscription Filter Policies

By default, every subscriber to an SNS topic receives every message published. In large-scale operations, broadcasting all alerts to all channels creates alert fatigue. CloudOps engineers implement SNS Subscription Filter Policies to filter messages based on message attributes.

When a message is published with attributes such as Severity = "CRITICAL" or Service = "RDS", subscribers define filter policies in JSON:

{
  "Severity": ["CRITICAL", "HIGH"],
  "Environment": ["Production"]
}

Subscribers whose policies do not match the published attributes are bypassed entirely without incurring Lambda execution fees, webhook spam, or email flooding.

Operational Scenario: Tiered Incident Routing

A typical enterprise operational architecture routes alerts based on severity and destination requirements:

  • Tier 1 (Critical Severity): An SNS topic filters for Severity = "CRITICAL". Subscriptions dispatch immediately to an on-call PagerDuty HTTPS webhook and an automated remediation Lambda function. The subscription is backed by an SQS DLQ to prevent dropped incidents during API throttling.
  • Tier 2 (Warning Severity): An SNS topic filters for Severity = "WARNING". Messages route to an Amazon SQS queue polled by a corporate chat application (e.g., Slack or Teams) and a daily operational digest email.
Test Your Knowledge

A CloudOps engineer configures a CloudWatch alarm to publish a notification to an Amazon SNS topic encrypted with an AWS KMS customer managed key (CMK) when an EC2 instance experiences high memory usage. When the alarm transitions to the ALARM state, no notifications are received by subscribers, and CloudWatch metrics indicate alarm action execution failures. What is the root cause and the required fix?

A
B
C
D
Test Your Knowledge

A CloudOps team maintains a single central SNS topic that receives alarm notifications from hundreds of workloads. The operations manager wants database failover alerts to trigger an automated remediation Lambda function, while operational billing alerts must only be sent to an administrative email address. How should this routing be implemented with the least operational overhead?

A
B
C
D
Test Your Knowledge

An Amazon SNS topic sends webhook notifications to an external ticketing system over HTTPS. During a ticketing system outage, several alarm messages fail to deliver. The CloudOps team needs to ensure that transient failures are retried automatically, but persistently undeliverable notifications are preserved for post-incident analysis without being silently dropped. Which configuration meets this requirement?

A
B
C
D