API destinations to Microsoft Teams channel

0

I am trying to send notification to Microsoft teams channel from AWS. I am using API destinations in eventbridge. On the teams side, I created an "incoming webhook" and I have that url. For connections there are three options, Basic (Username/Password), OAuth Client Credentials, API Key. Since I only have the webhook url, I put some dummy content for API keys (should I be putting valid here?). With this configuration, I am trying to test sending a dummy message to team and I am unsuccessful. what am I doing wrong? please help.

Marvin
asked 4 months ago258 views
2 Answers
0

You should use the following architecture: Eventbridge rule -> lambda function -> teams

An AWS EventBridge Rule matches a specific set of AWS events and sends them to a target. The target is a Lambda function that sends the event to a Microsoft Teams Channel using an Incoming HTTP WebHook.

The lambda can execute this example of python code:

import pymsteams
myTeamsMessage = pymsteams.connectorcard("<Microsoft Webhook URL>")
myTeamsMessage.text("this is my text")
myTeamsMessage.send()
answered 4 months ago
profile picture
EXPERT
reviewed a month ago
0

This doesn't answer the question directly but have you considered using ChatBot which has teams integration built-in https://aws.amazon.com/blogs/aws/aws-chatbot-now-integrates-with-microsoft-teams/

profile pictureAWS
answered 3 months ago

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