As part of our developing automation pipeline, we’re leveraging Amazon Simple Notification Services (SNS) to send notifications of job completion, failure, and other status messages. SNS provides topics to which endpoints can subscribe. Services can then post messages to these SNS topics for fanning out to all the various subscribers over a variety of different protocols. In our setup, we have two primary topics - one for CloudWatch alarms and one for all Data Pipeline notifications. CloudWatch alarms are primarily routed via PagerDuty while Data Pipeline messages go to a couple of different mailboxes in either plaintext or JSON format.
This was all well and good, but we’re working towards having a running stream of status messages, interesting data outputs, and other situational activity coming into our team’s Slack channel. While Slack has a very impressive suite of native integrations, the ability to natively subscribe and process Amazon SNS messages isn’t one of them. This necessitates some sort of intermediate service that can talk with both SNS and Slack. Enter Heroku!
The Slack-SNS app has some nice templates by which it can detect certain common types of SNS messages (CloudWatch alarms vs. plain text, for example) and provide custom formatting in Slack for the SNS type. I’ll eventually use this functionality to customize both the Slack message template as to make the Slack postings a bit more polished, but the solution works as is today and is effective at providing ticklers of process status without excessive amounts of email.