Eventbridge to Slack API Destination


I have setup a Slack API Destination in Eventbridge. I've test the api destination with custom pattern using simple message, it works. But when I add additional rule to use AWS Pre-defined event pattern for Elastic Beanstalk resource status change, the notification never arrived in the slack channel. I updated the rule with below configuration as instructed in documentation. But still not working

  • Include a header parameter that defines the content type as “application/json;charset=utf-8”.
  • Use an input transformer to map the input event to the expected output for the Slack API, namely ensure that the payload sent to the Slack API has “channel” and “text” key/value pairs.
asked 10 months ago297 views
1 Answer

Hi, Good question!

A couple of follow-ups.

  1. Have you checked that there are actual resource status changes? What filters are you using for Status and Severity? This is to validate that there are valid events that should be sending notifications. For more information: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/AWSHowTo.eventbridge.html

  2. Have you validated that the OAuth Token is setup: https://api.slack.com/authentication/oauth-v2

It looks like you've seen this page, but https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-api-destination-partners.html has links to Slack documentation for help as well.

answered 10 months ago
  • I finally figured out why. It is not the OAuth token. It is in the header parameter I need to put content-type: application/json;charset=utf-8

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions