Setup endpoint: AWS SNS HTTPS

Invite marbot to a Slack channel to create a new AWS SNS HTTPS endpoint, or use an existing endpoint ID. marbot provides the URL of the endpoint in a message to the channel. The URL will look like this: https://api.marbot.io/v1/endpoint/endpoint-ID

The same URL is used for the HTTPS endpoint

Many AWS services can send alerts to SNS topics. A few of them are:

Create an SNS topic in AWS to integrate AWS and marbot.

Creating an SNS topic in AWS

  1. Visit https://console.aws.amazon.com/sns/?region=us-east-1
  2. Click on the Topics link on the left
  3. Click on the Create new topic button
  4. Choose a Topic name and Display name, e.g. marbot
  5. Click on the Create topic button

Create new SNS topic

The SNS topic is now created. Finally, you need to subscribe to the topic.

Subscribing to an SNS topic

First, make sure that your newly created SNS topic is selected.

Select SNS topic

Then click on the Actions button, where you click on the Subscribe to topic link.

Subscribe to topic

A dialog opens where you have to set the Protocol to HTTPS and the Endpoint to the URL that marbot send to you in Slack. Click on the Create subscription button to save.

Subscribe to topic

marbot will confirm the subscription in the Slack channel.

marbot confirms the subscription

Now you can use the endpoint. Let’s send a test message!

Sending a test message to an SNS topic

Again, make sure that your newly created SNS topic is selected. This time, click on the Publish to topic button.

Enter a Subject and a Message. Keep the Message format to Raw. The message can be either JSON formatted, plain text, or key-value pairs separated by : (colon and space). I will use the key-value pairs form here:

Publish a message

Results in the following generic alert:

Generic Alert

Getting the ARN of an SNS topic

The Amazon Resource Name (ARN) is a unique identifier. To get the ARN of your SNS topic:

  1. Visit https://console.aws.amazon.com/sns/?region=us-east-1
  2. Click on the Topics link on the left
  3. Copy the value from the ARN column

SNS topic ARN