“ I have to make an approval and notification rule for codecommit repo so the user has a maintained way to have approval process and get notified while pull request : creation and merge. It's easy to create approval rules and notification rules in codecommit with IAM user creation and SNS topic with subscription. Pricing of codecommit and sns depends on users storage and requests.”
AWS CodeCommit is a version control service hosted by AWS that you can use to privately store and manage assets in the cloud. For information about pricing for codecommit, see Pricing.
In this post, you will get to know how to explore the approval rule and notification rule in codecommit repo. Here I have created codecommit repo, IAM user, SNS topic and subscription, codecommit approval and notification rule template.
Architecture Overview
The architecture diagram shows the overall deployment architecture with data flow, aws codecommit repo, approval rule, notification rule, iam user and sns.
Solution overview
The blog post consist of the following phases:
- Create of IAM User and SNS Topic with Subscription
- Create of Approval Rule Template and Notification Rule in CodeCommit
- Output as Creation of Pull Request and Approve with Merge on the Pull Request by IAM User. Checkout the Main Branch Files as Dev Branch after Merge of Branches
I have a codecommit repo with main and dev branch as below →
Phase 1: Create of IAM User and SNS Topic with Subscription
- Open the IAM console and create a user with console administrator access. Also create a sns topic with subscription.
Phase 2: Create of Approval Rule Template and Notification Rule in CodeCommit
- Open the CodeCommit console and create an approval rule template for user approval. Also open the repository as testrepo and create a notification rule for pull request creation and merge. Need to update the access policy for sns as the notification target is unreachable.
Phase 3: Output as Creation of Pull Request and Approve with Merge on the Pull Request by IAM User. Checkout the Main Branch Files as Dev Branch after Merge of Branches
Clean-up
Delete CodeCommit Repo, IAM User, SNS Topic, SNS Subscription, CodeCommit Approval Rule Template.
Pricing
I review the pricing and estimated cost of this example.
Cost of Simple Notification Service = Free for notifications and requests = $0.0
Cost of CodeCommit = $0.00 for first 5 CodeCommit users = $0.0
Total Cost = $0.0
Summary
In this post, I showed “explore the approval rule and notification rule in codecommit repo”.
For more details on AWS CodeCommit, Checkout Get started AWS CodeCommit, open the AWS CodeCommit console. To learn more, read the AWS CodeCommit documentation.
Thanks for reading!
Connect with me: Linkedin
Top comments (0)