Skip to content

AWS lambda function to send Slack notifications for CodeBuild events

License

Notifications You must be signed in to change notification settings

schedulino/codebuild-slack-notifier

 
 

Repository files navigation

codebuild-slack-notifier

AWS Lambda to send Slack notifications for CodeBuild events.

Install

A valid Slack oauth token needs to be stored as a secure string in the SSM parameter store as /codebuild-slack-notifier/slack_token and also valid Slack channels needs to be stored as a string in the SSM parameter store as /codebuild-slack-notifier/${projectName}_channels.

NOTE: The slack oauth needs to have follow permission scopes: channels:history, channels:read, chat:write:bot

Then run:

npm install
npm run deploy

With AWS credentials that have access to read from SSM and deploy a lambda.

Additionally, you can modify the deploy command by adding additional serverless arguments:

npm run deploy -- --stage production --region us-east-1

Configuration

Using chamber, you can set the corresponding Slack channel(s) for each codebuild project.

chamber write codebuild-slack-notifier {project_name}_channels {slack_channel}

About

AWS lambda function to send Slack notifications for CodeBuild events

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 98.0%
  • JavaScript 2.0%