Skip to content

Latest commit

 

History

History
34 lines (28 loc) · 1.25 KB

File metadata and controls

34 lines (28 loc) · 1.25 KB

AWS CodePipeline Teams Notification

Push AWS CodePipeline Notifications into Microsoft Teams as Webhook using AWS Lambda Function

This is an improved version of https://github.com/globaldatanet/aws-codepipeline-notification

AWS Lambda Function

  • Runtime: Python 3.8
  • Code: aws-codepipeline-msteams-notification.py
  • Environment Variables:
KEY VALUE SCOPE
WebhookUrl https://webhook_url_here Required
AccountId My AWS Account Optional

Amazon EventBridge (CloudWatch Events)

  • Type: Event Rule
  • Event Pattern:
{
  "source": ["aws.codepipeline"],
  "detail-type": ["CodePipeline Action Execution State Change"],
  "detail": {
    "state": ["SUCCEEDED", "FAILED"]
  }
}

Only Success and Failures are included to avoid spamming. All the three stages Source, Build, and Deploy are included. You may adjust as required.

Microsoft Teams Incoming Webhook

Refer here to generate a WebHook URL for a Teams Channel.

Sample Notification

Sample Teams Notification