Syndication Notifications
Syndication can trigger automated notifications for key events in your publishing jobs. This is useful for monitoring job health and alerting downstream systems.
Supported Events
Syndication sends notifications for the following job events via Amazon SNS:
Severity | Event |
---|---|
Info | A user starts a syndication job |
Info | A user stops a syndication job |
Warning | Syndication retries starting a job after initial failure |
Warning | Syndication was unable to communicate with the target platform |
Critical | Job could not be started or restarted after multiple attempts |
Critical | Job was forcibly stopped |
How It Works
-
Syndication pushes job event data to Amazon SNS.
-
Amazon SNS broadcasts notifications to subscribed destinations such as:
- Slack
- Web servers
- Mobile devices
SNS messages are sent in JSON format and can be filtered or routed via custom AWS Lambda functions.
Learn more: Amazon SNS Free Tier
Example: Send notifications to Slack
Setup Instructions
1. Create an SNS Topic
- Sign in to the AWS Management Console.
- Go to the SNS Console.
- Create a Standard topic. (FIFO topics are not supported.)
- Name it (e.g.,
syndication-publishing
). - Set Access Policy to allow only account
545191325524
to publish. - Copy the Topic ARN.
2. Connect Syndication to SNS
- In the Syndication page (left-side nav), go to the SNS tab.
- Paste your Topic ARN into the SNS Topic ARN field.
- Click Save.
3. (Optional) Forward to Slack via Lambda
To forward notifications to a Slack channel:
-
Set up a Slack Incoming Webhook.
-
Go to the AWS Lambda Console and click Create function.
-
Choose Author from scratch.
- Function name:
forward_to_slack
- Runtime: Python 2.7 or 3.x
- Permissions: Choose "Create a new role with basic Lambda permissions"
- Function name:
-
Under Function code, paste the following sample:
import json
import urllib2 # Use urllib.request if using Python 3
def forward_to_slack (event, context):
url = "https://hooks.slack.com/services/XXXX/XXXX/XXXX" # Replace with your Slack webhook
try:
slack_data = {"text": str(event['Records'][0]['Sns']['Message'])}
except:
slack_data = {"text": str(event)}
data = json.dumps(slack_data)
req = urllib2.Request(url, data)
urllib2.urlopen(req)
-
Set the Handler name to
lambda_function.forward_to_slack
. -
Click Create function.
-
In the newly created function, click Add trigger.
- Select SNS as the trigger type.
- Choose the SNS topic you created earlier.
- Enable the trigger.
Now, notifications sent from Syndication via SNS will automatically be forwarded to your Slack channel.
Notification Format
Each SNS message is a JSON object containing:
Field | Description |
---|---|
Subject | Summary of the event. Format: Syndication Notification - {Severity} - {Event} |
Message | JSON payload with detailed info |
Date_Time | Timestamp of the event |
Severity | One of Info , Warning , or Critical |
Message | Event type (e.g., "Job started by user") |
Description | More context about the event |
Schedule_Id | Internal job ID |
Target_Name | Name of the target |
Protocol | Delivery protocol (e.g., RTMP, HLS) |
Platform | Target platform (e.g., YouTube, Facebook) |
Content_Name | Name of the channel or event |
Content_Id | System ID of the channel or event |
Content_Type | c for channel or e for event |
Example Payload
{
"Service": "syndication",
"Sender": "syndication",
"Date_Time": "2021-12-10_21:15:55",
"Severity": "Info",
"Message": "Job started by user",
"Description": "",
"Schedule_Id": "23f1ed53db5e4538b6a0b31183fad807",
"Target_Name": "YouTubePT",
"Protocol": "rtmp",
"Platform": "YouTube",
"Content_Name": "Entertainment",
"Content_Id": "c8929b67f1354607877b319edb0c01af",
"Content_Type": "c"
}
Updated 10 days ago