Amazon SNS Inbound Integration

With the ilert Amazon SNS integration, you can create alerts in ilert based on SNS notifications.

Amazon Simple Notification Service (Amazon SNS) is a fully managed messaging service for both application-to-application (A2A) and application-to-person (A2P) communication.

The A2A pub/sub functionality provides topics for high-throughput, push-based, many-to-many messaging between distributed systems, microservices, and event-driven serverless applications. Using Amazon SNS topics, your publisher systems can fanout messages to a large number of subscriber systems including Amazon SQS queues, AWS Lambda functions and HTTPS endpoints, for parallel processing, and Amazon Kinesis Data Firehose. The A2P functionality enables you to send messages to users at scale via SMS, mobile push, and email.

In ilert: Create an Amazon SNS alert source

  1. Go to Alert sources --> Alert sources and click on Create new alert source

  2. Search for Amazon SNS in the search field, click on the Amazon SNS tile and click on Next.

  3. Give your alert source a name, optionally assign teams and click Next.

  4. Select an escalation policy by creating a new one or assigning an existing one.

  5. Select you Alert grouping preference and click Continue setup. You may click Do not group alerts for now and change it later.

  6. The next page show additional settings such as customer alert templates or notification prioritiy. Click on Finish setup for now.

  7. On the final page, an API key and / or webhook URL will be generated that you will need later in this guide.

In AWS Console: Create a SNS topic subscrition

If you already have an Amazon SNS topic, please skip the steps 1 and 2.

  1. Go to the AWS Console and then to Amazon SNS, then click on the Topic link and on the Create topic button**.**

  1. On the next page, choose Standard topic, name the topic e.g. ilert and click on the Create topic button

  1. On the topic overview page, click on the Create subscription button

  1. On the next page, in the Protocol section choose HTTPS, on the Endpoint section paste the Webhook URL that you generated in ilert and click on the Create subscription button

Do not activate the checkbox Enable raw message delivery. ilert won't process those messages otherwise.

  1. Finished! Your Amazon SNS notifications will now create alerts in ilert.

Custom attributes

All attributes are optional

AttributePreconditionsAllowed values

eventType

optional

ALERT, ACCEPT, RESOLVE

incidentKey

required if eventType used

Any string

incidentUrl1

optional

Any URL string

incidentUrl2

optional

Any URL string

incidentUrl3

optional

Any URL string

Example

AmazonSNSClient snsClient = new AmazonSNSClient(new BasicAWSCredentials("AWS_ACCESS_KEY","AWS_SECRET_KEY"));

String msg = "Test incident details";
String subject = "Test alert for Amazon SNS Integration";

PublishRequest publishRequest = new PublishRequest("arn:aws:sns:xxxxxxxxx:xxxxxxxxxx:MyTopic", msg, subject);

publishRequest.addMessageAttributesEntry("eventType", new MessageAttributeValue()
                    .withDataType("String").withStringValue("ALERT"));
publishRequest.addMessageAttributesEntry("incidentKey", new MessageAttributeValue()
                    .withDataType("String").withStringValue("my-uniq-incident-string"));
publishRequest.addMessageAttributesEntry("priority", new MessageAttributeValue()
                    .withDataType("String").withStringValue("HIGH"));
publishRequest.addMessageAttributesEntry("incidentUrl1", new MessageAttributeValue()
                    .withDataType("String").withStringValue("https://www.ilert.com"));

PublishResult publishResult = snsClient.publish(publishRequest);

FAQ

Will alerts in ilert be resolved automatically?

No, but you can use the eventType custom attribute to resolve an incident in specified incidentKey.

Can I accept an incident via Amazon SNS?

Yes, use the eventType custom attribute to resolve an incident in specified incidentKey.

Can I connect Amazon SNS Alerting with multiple alert sources from ilert?

Yes, simply add more Amazon SNS topics or add more topic subscriptions to the same topic and use the incidentKey custom attribute.

Last updated