How to integrate AWS CodeCommit with Buddy
Step 1: Synchronizing repository
- At the moment, CodeCommit is not availabe from the source provider list. To add it, start with creating a new project and selecting the private Git server:
Image loading...
- Then, in the Repository URL field, enter the SSH address of your CodeCommit repository:
Image loading...
- Now we need to authenticate Buddy in your AWS account. To do that, download the SSH key displayed on the creation screen:
Image loading...
- Log in to your Amazon IAM settings and add the key by clicking Upload SSH public key:
Image loading...
Once you add the key, you should see something like this:
Image loading...
- Now, copy the key ID and paste it at the beginning of the repository URL in the following format (see point 3 for comparison):
ssh://SSH_KEY_ID@repository_ssh_url
Image loading...
- Click Create a new project to finish configuration. After a while, your repository should be successfully synchronized.
Image loading...
Step 2: Configuring repository webhook
- The last step is making sure that Buddy is informed about changes pushed to your CodeCommit repository. Go to your repository settings on AWS and click Notify → Create notification rule:
Image loading...
Enter the name and configure the details according to the screenshot below. Select SNS Topic as the target and click Submit when ready:
Image loading...
Notification rule settings:
# Detail type:
- Full
# Events:
- Comments: On commits, On pull requests
- Branches and tags: Created, Deleted, Updated
- With the rule configured, go to Code where you'll find the synchornization and activity details for the connected repository. Click the hamburger button and select Fetch missing commits only.
Image loading...
- Copy the refresh webhook – we will need it shortly:
Image loading...
- Go back to Amazon and switch to the Simple Notification Service (SNS). Look up the topic that you created, click Create subscription, and paste the webhook from Buddy in the Endpoint field:
Image loading...
With the subscription created, go back to Code in Buddy. On the activity list in the Deliveries tab, you should see a registered webhook from Amazon. Copy the address from the
"SubscribeURL"
line of the webhook log and open it in your browser. This operation will confirm the topic.Finally, you can check if everything is working in the Amazon console:
Image loading...
Related read
- Deployment to AWS – learn how to configure a deployment pipeline to EC2, S3, Elastic Beanstalk, CodeDeploy, and Lambda services.
- AWS integration – learn how to properly integrate Amazon services with Buddy using access & secret keys, or role assumption.
- AWS policies – the list of policies required by Buddy to integrate with AWS
Jarek Dylewski
Customer Support
A journalist and an SEO specialist trying to find himself in the unforgiving world of coders. Gamer, a non-fiction literature fan and obsessive carnivore. Jarek uses his talents to convert the programming lingo into a cohesive and approachable narration.