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

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南