AWS CodeCommit Repository That Triggers Email Notifications

AWS CodeCommit Repository That Triggers Email Notifications

March 30, 2021 / Nirav Shah

Here, the QA team notified each time when there is some change in the source code repository.

Below is the practice scenario,

Step 1 : Open the CodeCommit console.

AWS CodeCommit Repository That Triggers Email Notifications

On the Repositories page, click Create repository.

AWS CodeCommit Repository That Triggers Email Notifications

On the Create Repositories page, set the following values:

AWS CodeCommit Repository That Triggers Email Notifications

Step 2 : Create an index.html file

AWS CodeCommit Repository That Triggers Email Notifications

Step 3 : Create an Amazon SNS Topic.

Navigate to Amazon SNS.

AWS CodeCommit Repository That Triggers Email Notifications

  1. On the homepage, enter the topic name in the Create Topic section and click the Next step.
  2. On the Create topic page, enter the topic name in Display Name to use the topic with Email subscriptions.
  3. Leave the rest as their defaults and click Create topic.

AWS CodeCommit Repository That Triggers Email Notifications

Click Create

Step 4 :

  1. From the Subscriptions page, click Create subscription.
  2. On the Create subscriptions page, set the following values:
    • Protocol: Email
    • Endpoint: Enter your email address
  3. Click Create a subscription to send a confirmation message to the registered email.
  4. Open the AWS Subscription Confirmation email and click Confirm subscription.

AWS CodeCommit Repository That Triggers Email Notifications

Step 5 : Subscribe to the Topic.

Open your Email address and subscribe to the topic.

AWS CodeCommit Repository That Triggers Email Notifications

AWS CodeCommit Repository That Triggers Email Notifications

After Subscription, you will see it on the console.

AWS CodeCommit Repository That Triggers Email Notifications

Step 6 : Create a Topic Trigger

  1. Navigate to AWS CodeCommit.
  2. From the Repository page, select the newly created repository.
  3. From the left menu, click Source > Settings.
  4. Click Triggers > Create trigger.

AWS CodeCommit Repository That Triggers Email Notifications

AWS CodeCommit Repository That Triggers Email Notifications

Step 7 : Now do some changes to the main repository. When you do some change it will trigger the SNS topic and you will get an email notification that someone has changed in the repository.

AWS CodeCommit Repository That Triggers Email Notifications
AWS CodeCommit Repository That Triggers Email Notifications

Hence you will get all the notifications via Email when someone going to change your main Repository.

Stay tuned for more AWS DevOps blogs by Team Eternal.

Talk to AWS Certified Consultant

    Spread Love By Sharing:

    Let Us Talk About Your AWS Development Requirements

    Have queries about your AWS project ideas and concepts? Please drop in your project details to discuss with our AWS experts, professionals and consultants.

    • Swift Hiring and Onboarding
    • Experienced and Trained AWS Team
    • Quality Consulting and Programming
    Let’s Connect and Discuss Your Project