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 SNSNotification 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
Messagefield that defines the alert status, summary, external identifier, and optional metadata for routing, urgency, labels, and enrichment. When Rootly receives a payload withstatus: "triggered", it creates a new alert. When it receives a payload withstatus: "resolved"and the sameexternal_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.
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.
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 aSubscriptionConfirmation 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:
versionidentifies which Rootly payload contract is being used.statusdetermines whether the alert should be triggered or resolved.summarybecomes the alert title unless overridden by alert fields.external_idis used to match trigger and resolve events for the same alert.
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 After the message is received, Rootly resolves the matching unresolved alert.
external_id and status: "resolved".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.Required Fields
versionstatussummaryexternal_id
Supported Status Values
triggeredresolved
Optional Fields
noisedescriptionservice_idsgroup_idsenvironment_idsexternal_urlalert_urgency_idlabelsdatastarted_atended_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 SNSNotification 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
- 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
AlarmArnto match events for the same alarm. AnALARMmessage triggers an alert, and theOKmessage 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:summarybecomes the alert title.descriptionbecomes the alert description.external_idis used to correlate trigger and resolve events.external_urlbecomes the source link.labelsare attached to the alert as Rootly labels.datais stored as alert payload metadata and can be used in alert fields, urgency rules, and routing conditions.service_ids,group_ids, andenvironment_idscan associate the alert with existing Rootly resources.
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 usesexternal_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_idmatches 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.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 theMessage field.
At delivery time, the full payload sent by SNS resembles the following structure:
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
Why are AWS SNS alerts not being created in Rootly?
Why are AWS SNS alerts not being created in Rootly?
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.Why are AWS SNS alerts not being resolved automatically?
Why are AWS SNS alerts not being resolved automatically?
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.Why is the SNS subscription stuck in Pending confirmation?
Why is the SNS subscription stuck in Pending confirmation?
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.
Why is Rootly rejecting my SNS message?
Why is Rootly rejecting my SNS message?
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_idfor every alert lifecycle so Rootly can reliably match trigger and resolve events. - Store additional contextual metadata under
dataso 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.