AWS Certified Developer - Associate: CodeCommit Repository Notifications

CodeCommit Repository Notifications

Prev Question Next Question

Question

Your developers have been given access to a CodeCommit Repository.

You need to ensure that if any changes are made to a repository, notifications are sent accordingly.

Which of the below 2 destinations can be used for the notifications.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and B.

The AWS Documentation mentions the following.

You can configure an AWS CodeCommit repository so that code pushes or other events trigger actions, such as sending a notification from Amazon Simple Notification Service (Amazon SNS) or invoking a function in AWS Lambda.

You can create up to ten triggers for each AWS CodeCommit repository.

Option C is incorrect since this is used to monitor configuration changes.

Option D is incorrect since this is used for managing IAM users.

For more information on the notification, please refer to the below URL-

https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify.html

The correct answer is B. AWS SNS.

AWS SNS (Simple Notification Service) is a fully managed messaging service that enables the sending of messages to various recipients or endpoints such as email, text messaging, mobile push notifications, and HTTP endpoints. SNS can be used to send notifications whenever a change occurs in the CodeCommit repository.

Here's how it works:

  1. Create an SNS topic: First, you need to create an SNS topic, which is a logical access point for receiving and publishing messages. The topic can be created via the AWS Management Console, AWS CLI, or AWS SDKs.

  2. Subscribe to the SNS topic: Next, you need to subscribe to the SNS topic. A subscription is a way to receive messages from a topic. You can subscribe to an SNS topic using email, SMS, or an HTTP/S endpoint.

  3. Configure CodeCommit repository: Once the SNS topic is created and subscribed, you need to configure the CodeCommit repository to publish messages to the SNS topic whenever a change is made to the repository.

  4. Create a notification rule: Finally, you need to create a notification rule in CodeCommit that specifies the SNS topic to publish messages to whenever a change is made to the repository.

AWS Lambda, on the other hand, is a serverless compute service that allows running code without provisioning or managing servers. It can be used to process events generated by CodeCommit, but it is not suitable for sending notifications.

AWS Config is a service that enables you to assess, audit, and evaluate the configuration of AWS resources. It does not support sending notifications for CodeCommit changes.

AWS IAM (Identity and Access Management) is a service that enables controlling access to AWS resources. It is not used for sending notifications.

Therefore, the correct answer is B. AWS SNS.