Skip to main content

Overview

The AWS SNS integration allows Rootly to treat Amazon Simple Notification Service (SNS) messages as a native alert source. Rootly subscribes to an SNS topic using an HTTPS webhook endpoint and processes SNS Notification messages that contain a supported Rootly alert payload. Unlike AWS CloudWatch, Amazon SNS is a transport layer rather than a fixed alert producer, so Rootly accepts two kinds of messages on an SNS topic:
  • Rootly payloads (recommended): a versioned JSON schema inside the SNS Message field that defines the alert status, summary, external identifier, and optional metadata for routing, urgency, labels, and enrichment. When Rootly receives a payload with status: "triggered", it creates a new alert. When it receives a payload with status: "resolved" and the same external_id, it resolves the corresponding alert.
  • Native AWS messages: messages that AWS services publish to the topic on their own, such as CloudWatch alarms, S3 event notifications, RDS event subscriptions, AWS Backup notifications, and EventBridge rules. Rootly creates an alert for each one. See Native AWS Messages.
Alerts created from SNS can be routed to services, escalation policies, or teams, enriched with labels and metadata, customized with alert fields, and sent directly to specific notification targets using Rootly’s specialized webhook endpoint format.
AWS SNS does not define a native alert schema. If you control what gets published to the topic, use the versioned Rootly payload so alerts are created, deduplicated, and resolved consistently. If AWS services publish to the topic directly, you don’t need to change their messages.
AWS SNS alert-source support is currently in beta. Rootly recommends validating your payloads, routing rules, urgency configuration, and resolve behavior in a non-production environment before rolling the integration out broadly.

How the Integration Works

Amazon SNS publishes messages to a Rootly-managed HTTPS webhook endpoint generated when you create an AWS SNS alert source in Rootly. When Amazon SNS sends a SubscriptionConfirmation request, Rootly automatically attempts to confirm the subscription. After the subscription is confirmed, SNS delivers Notification messages to the Rootly webhook endpoint. For each incoming notification, Rootly reads the SNS envelope and parses the content stored in the Message field. If the message declares a version, Rootly treats it as a Rootly payload, validates it against the supported versioned schema, and uses the following fields to determine behavior:
  • version identifies which Rootly payload contract is being used.
  • status determines whether the alert should be triggered or resolved.
  • summary becomes the alert title unless overridden by alert fields.
  • external_id is used to match trigger and resolve events for the same alert.
If the message has no version, Rootly treats it as a native AWS message and creates an alert from it, as described in Native AWS Messages.

Prerequisites

Before configuring the integration, ensure that you have access to an AWS account with permissions to manage SNS topics and subscriptions. You must also have a Rootly account with access to Alert Sources.

Setup Instructions

1

Create an Alert Source in Rootly

Begin by creating an AWS SNS alert source in Rootly. Navigate to Settings → Alert Sources and click Add Alert Source. Select AWS SNS and provide a descriptive name, such as “Production SNS Alerts.”You may optionally configure default alert urgency, owner groups, alert fields, or deduplication settings. Once the alert source is saved, copy the webhook URL provided by Rootly.
The webhook secret authenticates incoming requests from Amazon SNS. Treat this value as sensitive and rotate it if it is exposed.
2

Create an SNS Topic

In the AWS SNS Console, create a new topic using the Standard topic type and give it a clear, descriptive name such as rootly-aws-sns-alerts.This SNS topic acts as the delivery mechanism between your alert publisher and Rootly.
3

Subscribe Rootly to the SNS Topic

Open the SNS topic and navigate to the Subscriptions tab. Create a new subscription using the HTTPS protocol and paste the Rootly webhook URL into the endpoint field.AWS sends a subscription confirmation request to the webhook endpoint. Rootly automatically attempts to confirm this request, and the subscription typically transitions to Confirmed within a few seconds.
If the subscription remains in a pending state, verify that the webhook endpoint is reachable and that no network restrictions are blocking AWS SNS traffic.
4

Publish a Test Message

In the AWS SNS Console, open the topic and click Publish message. Paste a valid Rootly SNS schema payload into the message body.For a minimal trigger test, publish the following JSON as the SNS message body:
Rootly receives this JSON inside the SNS Message field and validates it before creating the alert.
5

Test Resolution

To resolve the alert, publish another SNS message with the same external_id and status: "resolved".
After the message is received, Rootly resolves the matching unresolved alert.

Supported Payload Schema

Rootly currently supports version 1 of the AWS SNS alert payload schema. This is the recommended format whenever you publish your own messages to the topic.
If a message declares a version but does not match the supported schema (for example “version”: 2, or a version 1 payload without external_id), Rootly rejects it with an HTTP 422 status and a description of the problem, and no alert is created. Amazon SNS treats a 422 as a permanent failure: it does not retry the message, and the failed delivery appears in the topic’s NumberOfNotificationsFailed metric and in your dead-letter queue, if one is configured. Correct the payload and publish it again.

Required Fields

  • version
  • status
  • summary
  • external_id

Supported Status Values

  • triggered
  • resolved

Optional Fields

  • noise
  • description
  • service_ids
  • group_ids
  • environment_ids
  • external_url
  • alert_urgency_id
  • labels
  • data
  • started_at
  • ended_at

Version 1 Example

Use the same external_id for the triggered and resolved messages that represent the same alert. Rootly uses this value to match resolve events to the correct alert.

Native AWS Messages

You can subscribe Rootly to an SNS topic that AWS services publish to directly, without reshaping their messages. Rootly creates an alert for every SNS Notification whose Message does not declare a version, including:
  • CloudWatch alarms
  • S3 event notifications, such as replication failures
  • RDS event subscriptions
  • AWS Backup notifications, including plain-text messages
  • EventBridge rules that target the topic, such as GuardDuty findings, AWS Health events, and Backup job state changes
  • Other services that publish to SNS, such as Cost Anomaly Detection, ElastiCache, Auto Scaling, and CloudFormation
For native messages:
  • Title: the SNS Subject, or the message text when there is no subject. Use alert fields to build a more specific title from the message content.
  • Payload: the full message is stored on the alert, so it can be used in alert fields, urgency rules, and routing conditions.
  • CloudWatch alarms: Rootly uses the AlarmArn to match events for the same alarm. An ALARM message triggers an alert, and the OK message for the same alarm resolves it automatically.
  • Other native messages: each message creates a separate alert. AWS does not send a matching “resolved” message for one-off events such as S3, RDS, Backup, or EventBridge notifications, so these alerts are not resolved automatically. Resolve them in Rootly.
Native AWS messages that happen to contain fields named status, summary, or external_id are not interpreted as a Rootly payload. Only messages that declare a version use the Rootly schema.

Alert Mapping and Behavior

For Rootly payloads, Rootly maps schema fields to alert attributes as follows:
  • summary becomes the alert title.
  • description becomes the alert description.
  • external_id is used to correlate trigger and resolve events.
  • external_url becomes the source link.
  • labels are attached to the alert as Rootly labels.
  • data is stored as alert payload metadata and can be used in alert fields, urgency rules, and routing conditions.
  • service_ids, group_ids, and environment_ids can associate the alert with existing Rootly resources.
If you configure alert fields for the source, those fields can override the title, description, and source link shown in Rootly.

Advanced Configuration

Alert Fields

Alert fields allow you to transform the incoming SNS payload into alert fields using Liquid templates. These fields can be used to customize the alert title, description, and source link, as well as create additional custom fields for routing, urgency, filtering, and reporting. Because SNS messages are stored as alert payload data in Rootly, you can inspect a sample alert from the source and use the alert payload viewer to copy Liquid variables and JSONPath selectors for field configuration.

Alert Urgency

AWS SNS alerts can be assigned urgency dynamically using Rootly alert urgency rules. Rules may be based on raw payload JSONPath values or on alert field values generated from the SNS message. If no rule matches, Rootly applies the source’s fallback alert urgency.

Deduplication and Resolution

Rootly uses external_id to match trigger and resolve events for the same SNS alert. For CloudWatch alarms published directly to the topic, Rootly uses the alarm’s AlarmArn instead. If you want to suppress repeated notifications that represent the same incoming event, you can also configure a unique identifier in the Events tab and enable duplicate alert suppression. This deduplication setting is separate from the required external_id field:
  • external_id matches triggered and resolved events for the same alert.
  • the Events tab unique identifier can suppress repeated create events before additional alerts are created.

Notification Targets

In addition to default routing rules, SNS alerts can be sent directly to specific notification targets using a specialized webhook endpoint.
The notification target type must be one of Service, EscalationPolicy, or Group. The notification target ID must be replaced with the UUID of the corresponding resource.

Webhook Payload Structure

Amazon SNS delivers a standard SNS envelope to Rootly. The Rootly alert payload, or the native AWS message, is carried inside the Message field. At delivery time, the full payload sent by SNS resembles the following structure:
When publishing from the SNS Console, you normally provide only the inner JSON object. Amazon SNS wraps it in the outer envelope automatically.

Security Considerations

Rootly webhook endpoints require HTTPS and use a secret key to authenticate incoming requests. SNS subscription confirmation requests are automatically handled by Rootly. If IP allowlisting is enabled for your Rootly instance, ensure that AWS SNS traffic is permitted.

Troubleshooting

Verify that the SNS subscription is confirmed and that the webhook URL configured in SNS exactly matches the one provided by Rootly. If you publish Rootly payloads, check the topic’s NumberOfNotificationsFailed metric or dead-letter queue for rejected messages, and confirm that the payload includes the required schema fields: version, status, summary, and external_id.
For Rootly payloads, ensure that the resolved SNS message uses status: “resolved” and the same external_id used when the alert was first triggered. If the external_id differs, Rootly will treat the resolution as unrelated to the original alert. For CloudWatch alarms, the alert resolves when the same alarm sends its OK message. Other native AWS messages are not resolved automatically.
Confirm that the webhook endpoint is reachable over HTTPS and that no firewall rules or IP allowlisting restrictions are blocking AWS SNS traffic. Also verify that the webhook URL is correctly formatted and includes the required secret parameter.
Messages that declare a version are validated against the supported versioned payload schema. If validation fails, Rootly responds with HTTP 422 and an error that names the problem, such as an unsupported version or a missing required field. Amazon SNS does not retry these messages. Start with the minimal valid payload, add optional fields incrementally, and use “version”: 1 as an integer.

Best Practices

  • When you control the publisher, send the versioned Rootly payload. It gives you explicit titles, deduplication, and resolution.
  • When AWS services publish to the topic directly, use alert fields to build titles from the message content, and resolve one-off events in Rootly.
  • Start with the minimal required schema and add optional fields gradually as you validate your integration.
  • Use a stable and descriptive external_id for every alert lifecycle so Rootly can reliably match trigger and resolve events.
  • Store additional contextual metadata under data so it can be reused in alert fields, urgency rules, and routing conditions.
  • Use alert fields and the payload viewer in Rootly to validate Liquid variables and JSONPath selectors before depending on them for routing or urgency.
  • Periodically publish a trigger and resolve test pair to validate that the integration continues to function as expected.
For additional assistance, consult the Rootly documentation or contact Rootly Support. You may also refer to AWS SNS documentation for more information about topic, subscription, and delivery behavior.