Skip to content

miztiik/serverless-code-commit-repo-event-notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

14 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Serverless AWS CodeCommit Repository Event Notifier

A simple lambda function that gets triggerred in response to an AWS CodeCommit repository events and update the team in slack.

Fig : Serverless AWS CodeCommit Repository Event Notifier

Follow this article in Youtube

  1. Pre-Requisities

    We will need the following pre-requisites to successfully complete this activity,

  2. Configure Lambda Function

    • The python script is written(and tested) in Python 3.7.
    • Copy the code from serverless-code-commit-repo-event-notifier in this repo to the lambda function
    • Optional: Add slack slack_webhook_url in the environment variable
    • Save the lambda function
  3. Configure Lambda Triggers

    • Choose AWS CodeCommit from the list of services.

    Fig : Serverless AWS CodeCommit Repository Event Notifier

    • In Repository name, choose your repository name.

    • In Trigger name, enter a name for the trigger.

    • In Events, choose the repository events that trigger the Lambda function, for example, choose All repository events.

    • In Branches, Choose All branches, if you want the trigger to apply to all branches of the repository.

    • In Custom data, Optional: Leave empty for now.

    • Choose Next.

    Now your lambda function should be triggered when ever there is a CodeCommit event in your repository

  4. Testing the solution

    Create a new commit/branch in your repo, you should be getting the message in Slack(if configured).