Skip to content

AWS Lambda function to handle CodePipeline CloudWatch events and send notifications to Microsoft Teams.

Notifications You must be signed in to change notification settings

RSC-IoT-Open-Source/rsc-lambda-codepipeline-teams-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lambda CodePipeline Microsoft Teams Notifications

Lambda function to handle CodePipeline CloudWatch events and send a notification via Microsoft Teams. The function will send a notification to the Teams channel webhook for all CodePipeline Pipeline Execution State Change - which is the events for the whole pipeline. So for things like started, succeeded, and failed.

Started Started

Deployment

Requires Terraform 0.12+ to be installed.

  1. Change permissions of deployment bash script chmod +x deploy.sh
  2. Run ./deploy.sh which will prompt you for the following variables:
    • profile = AWS CLI profile
    • region = AWS Region
    • teams_webhook_url = URL for Microsoft Teams webhook

What's Going On:

  • Zips up the NodeJS code
  • Terraform creates:
    • IAM role for Lambda function
    • Lambda function with code (lambda.zip)
    • CloudWatch CodePipeline event

Tips

  • You can update the deploy.sh script to auto assign the variables so you're not prompted each time. It would look something like this:

    terraform apply \
        -var "profile=develop" \
        -var "region=eu-west-1" \
        -var "teams_webhook_url=https://..."

About

AWS Lambda function to handle CodePipeline CloudWatch events and send notifications to Microsoft Teams.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •