Eventbridge to Slack API Destination

0

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.
已提问 2 年前1501 查看次数
1 回答
0

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.

jsonc
已回答 2 年前
  • 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

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则