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. The endpoint URL will look like this: https://api.marbot.io/v1/endpoint/$endpoint-ID. Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel.

The same URL is used for the HTTPS endpoint

Many AWS services can send events 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

  1. make sure that your newly created SNS topic is selected.
    Select SNS topic
  2. click on the Actions button, where you click on the Subscribe to topic link.
    Subscribe to topic
  3. Set the Protocol to HTTPS
  4. Set the Endpoint to https://api.marbot.io/v1/endpoint/$endpoint-ID. Replace $endpoint-ID with the ID of your endpoint. You can get this value by asking @marbot for it in your Slack channel.
    Subscribe to topic
  5. Click on the Create subscription button to save.

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