Cloud Services

DevOps Intelligence

AWS CodeCommit configuration
Published On Dec 12, 2024 - 1:59 PM

AWS CodeCommit configuration

Learn how to configure DevOps Intelligence for the integration of AWS CodeCommit to broaden the observability of your hybrid IT estate.
AWS CodeCommit is a version control service used to privately store and manage assets such as documents, source code, and binary files in AWS provider systems. DevOps Intelligence supports the integration of CodeCommit using a basic configuration process as explained in subsequent text.

Data syncing

For the initial synchronization, our system is designed to comprehensively pull the last six months of data from the specified AWS CodeCommit APIs. After this thorough first-time data retrieval, subsequent synchronizations will employ a delta sync approach for the PullRequests and Commits APIs, fetching only the data that has been updated since the last sync time. For the remaining APIs listed below, the system will continue to retrieve the complete dataset during each sync to ensure full data integrity and consistency.
Data syncing within AWS CodeCommit is broken down into three sets of synchronization specifications as follows:
  • Initial sync: The system pulls the last 6 months of data for the AWS CodeCommit APIs during the first sync. This is to fetch historical data and set a baseline for future synchronizations.
  • Subsequent syncs: A delta sync process starts for PullRequests and Commits APIs from the second sync. This means that instead of pulling all data every time, the system only fetches the data concerning the time greater than the last sync time. In other words, it only syncs the new or updated data since the previous synchronization. This approach helps reduce the amount of data transferred and optimizes the sync process.
  • Other APIs: For the other APIs mentioned in the text, the system pulls all data every time during the sync process. This might be because these APIs are expected to have a smaller data volume or due to specific integration requirements.

Endpoint API details

Endpoint API Details provides information about various API endpoints interacting with AWS CodeCommit. These endpoints, Repos, Branches, Commitss, PullRequests, and PullRequest Details, allow you to fetch different data types from the CodeCommit service
  1. Repos:
    • Request Method: POST
    • URL: CodeCommit_20150413.ListRepositories
    • Purpose: List all repositories in the AWS CodeCommit account.
    • API Response:
      { "repositories":[ { "repositoryId": "f7579e13-b83e-4027-aaef-650c0EXAMPLE", "repositoryName": "MyDemoRepo" }, { "repositoryId": "cfc29ac4-b0cb-44dc-9990-f6f51EXAMPLE" "repositoryName": "MyOtherDemoRepo" } ] }
  2. Branches:
    • Request Method: POST
    • URL: CodeCommit_20150413.ListBranches
    • Purpose: List all branches within a specific repository.
    • API Response:
      { "branches":[ "main", "MyNewBranch" ] }
  3. Commits:
    • Request Method: POST
    • URL: CodeCommit_20150413.GetCommit
    • Purpose: Retrieve detailed information about a specific commit.
    • API Response:
      { "commit": { "commitId": "12345678EXAMPLE", "additionalData": "", "committer": { "date": "1484167798 -0800", "name": "Mary Major", "email": "[email protected]" }, "author": { "date": "1484167798 -0800", "name": "Mary Major", "email": "[email protected]" }, "treeId": "347a3408EXAMPLE", "parents": [ "7aa87a0EXAMPLE" ], "message": "Fix incorrect variable name\n" } }
  4. PullRequests:
    • Request Method: POST
    • URL: CodeCommit_20150413.ListPullRequests
    • Purpose: List all pull request IDs within a specific repository.
    • API Response:
      { "nextToken": "exampleToken", "pullRequestIds": ["2","12","16","22","30","23","35","39","47"] }
  5. PullRequest Details:
    • Request Method: POST
    • URL: CodeCommit_20150413.GetPullRequest
    • Purpose: Retrieve detailed information about a specific pull request.
    • API Response:
      { "pullRequest": { "approvalRules": [ { "approvalRuleContent": "{\"Version\": \"2018-11-08\",\"Statements\": [{\"Type\": \"Approvers\",\"NumberOfApprovalsNeeded\": 2,\"ApprovalPoolMembers\": [\"arn:aws:sts::123456789012:assumed-role/CodeCommitReview/*\"]}]}", "approvalRuleId": "dd8b17fe-EXAMPLE", "approvalRuleName": "2-approver-rule-for-main", "creationDate": 1571356106.936, "lastModifiedDate": 571356106.936, "lastModifiedUser": "arn:aws:iam::123456789012:user/Mary_Major", "ruleContentSha256": "4711b576EXAMPLE" } ], "lastActivityDate": 1562619583.565, "pullRequestTargets": [ { "sourceCommit": "ca45e279EXAMPLE", "sourceReference": "refs/heads/bugfix-1234", "mergeBase": "a99f5ddbEXAMPLE", "destinationReference": "refs/heads/main", "mergeMetadata": { "isMerged": false }, "destinationCommit": "2abfc6beEXAMPLE", "repositoryName": "MyDemoRepo" } ], "revisionId": "e47def21EXAMPLE", "title": "Quick fix for bug 1234", "authorArn": "arn:aws:iam::123456789012:user/Nikhil_Jayashankar", "clientRequestToken": "d8d7612e-EXAMPLE", "creationDate": 1562619583.565, "pullRequestId": "27", "pullRequestStatus": "OPEN" } }
Do you have two minutes for a quick survey?
Take Survey