canonical: https://jentic.com/apis/amazonaws.com/codecommit

# AWS CodeCommit

Jentic publishes the only available OpenAPI specification for AWS CodeCommit, keeping it validated and agent-ready. AWS CodeCommit is a managed Git source-control service that runs entirely inside an AWS account. The API exposes 77 operations covering repositories, branches, commits, files, pull requests, approval rule templates, and merge conflict inspection, so an agent can create branches, open and merge pull requests, and audit repository activity without using a Git client.

## For AI agents

Manage AWS CodeCommit repositories, branches, commits, files, pull requests, and approval rule templates through 77 endpoints - covering Git workflows that don't need a local clone.

## Scope

Does not handle CI/CD pipeline execution, package publishing, or container image storage - use for Git repository, branch, commit, and pull request management only.

## Capabilities

- Create, describe, and delete CodeCommit repositories with cross-account permissions
- Create branches, commits, and individual file changes via API rather than git push
- Open pull requests, post comments, approve, and merge with squash, fast-forward, or three-way strategies
- Define approval rule templates and associate them with repositories for required reviewers
- Inspect merge conflicts in detail with DescribeMergeConflicts and BatchDescribeMergeConflicts
- Tag CodeCommit repositories and configure event triggers for downstream pipelines

## Use cases

### Programmatic Pull Request Workflow

Tooling teams use CreatePullRequest, PostCommentForPullRequest, UpdatePullRequestApprovalState, and MergePullRequestBySquash to drive the entire review lifecycle without a Git client. ListPullRequests filters by repository, author, and status so an agent can audit open work or auto-merge ready PRs that satisfy approval rules. This is the path of least resistance when running review automation inside AWS without external CI.

Example prompt: Open a pull request from branch feature/login to branch main in repository web-app, then post the description from the linked Jira ticket as a comment

### API-Driven File Edits in a Repository

When an agent needs to update a config file across many repos (for example, a renovate-style dependency bump), CreateCommit and PutFile let it write changes without cloning. The API takes branch, parent commit ID, and a file blob, then returns the new commit ID. Combined with CreateBranch and CreatePullRequest, this enables fully unattended fleet-wide refactors.

Example prompt: Create a commit on branch chore/bump-deps in repository api-service that updates package.json to version 2.4.0 and opens a PR against main

### Approval Rule Governance Across Repositories

Platform teams enforce review standards by creating approval rule templates with CreateApprovalRuleTemplate and applying them with BatchAssociateApprovalRuleTemplateWithRepositories. The rule sets minimum approver counts and approver pools, so production repositories require two reviewers automatically. This is faster than configuring GitHub branch protection per repo when the source of truth lives in AWS.

Example prompt: Create an approval rule template requiring two members of the platform-leads pool, then associate it with all repositories tagged Tier=production

### AI Agent Integration via Jentic

Through Jentic, an AI agent uses CodeCommit by searching for an intent like 'open a CodeCommit pull request', loading the CreatePullRequest schema, and executing the call with source and destination references. Jentic signs the SigV4 request server-side using IAM credentials in your Jentic One instance.

Example prompt: Search Jentic for 'open a CodeCommit pull request', load the CreatePullRequest schema, and execute it with source feature/x, destination main, and a generated description

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | /#X-Amz-Target=CodeCommit_20150413.CreateRepository | Create a new Git repository |
| POST | /#X-Amz-Target=CodeCommit_20150413.CreateBranch | Create a branch in a repository |
| POST | /#X-Amz-Target=CodeCommit_20150413.CreateCommit | Create a commit with file changes |
| POST | /#X-Amz-Target=CodeCommit_20150413.CreatePullRequest | Open a pull request between branches |
| POST | /#X-Amz-Target=CodeCommit_20150413.CreateApprovalRuleTemplate | Define an approval rule template |
| POST | /#X-Amz-Target=CodeCommit_20150413.AssociateApprovalRuleTemplateWithRepository | Apply an approval rule template to a repository |
| POST | /#X-Amz-Target=CodeCommit_20150413.DescribeMergeConflicts | Describe merge conflicts between branches |

## Key resources

- **Repository** — Create, describe, update, and delete CodeCommit Git repositories
- **Branch** — Create branches and inspect branch tip commits
- **Commit** — Create commits with file changes and read commit metadata
- **Pull Request** — Open, comment on, approve, and merge pull requests with multiple strategies
- **Approval Rule Template** — Define and associate templates that enforce required reviewers
- **Merge Conflict** — Inspect conflicts between branches before merging

## Why Jentic

- **Setup:** Wiring AWS CodeCommit by hand means signing every request with AWS Signature v4 HMAC, targeting the right regional host like codecommit.{region}.amazonaws.com, and dispatching each operation through the X-Amz-Target header instead of a plain REST path. Through Jentic you install once, import AWS CodeCommit from the API Directory, store the AWS access key and secret once, and your agent calls it.
- **Permission scoping:** CodeCommit routes every operation through the X-Amz-Target header and carries the repository name in the request body, not the URL path, so scoping is by operation rather than by repository. You limit the agent to the operations it needs, such as CreatePullRequest or CreateCommit, so destructive ones like DeleteRepository or DeleteBranch are not included unless you add them.
- **Credential handling:** Your AWS access key and secret are stored once, encrypted, by your own Jentic One instance and injected at execution time when the Signature v4 request is signed. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'open a CodeCommit pull request' or 'create a commit on a branch', and Jentic returns the matching CodeCommit operation with its input schema, so the agent calls CreatePullRequest or CreateCommit directly without browsing the AWS docs.

## Related APIs

- **GitHub** — GitHub provides Git hosting plus an ecosystem of CI, code review, and collaboration tooling
- **GitLab** — GitLab offers integrated Git hosting, CI/CD, and security scanning in one product
- **AWS CodePipeline** — CodePipeline triggers builds and deployments from CodeCommit branch and PR events

## FAQ

### Why is there no official OpenAPI spec for AWS CodeCommit?

AWS does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call AWS CodeCommit via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the AWS CodeCommit API use?

CodeCommit uses AWS Signature Version 4 (HMAC) signed requests with an IAM access key and secret. Git over HTTPS uses Git credentials generated from IAM, while the management API used here uses raw SigV4. Through Jentic, the SigV4 signature is computed server-side from credentials in your Jentic One instance.

### Can I create a commit through the API without cloning the repository?

Yes. CreateCommit takes the repository name, target branch, parent commit ID, and an array of putFiles or deleteFiles entries with file content. It creates the commit on the branch tip and returns the new commit ID, so the agent can open a PR without a local Git working copy.

### How do I open and merge a CodeCommit pull request from the API?

Call CreatePullRequest with sourceReference, destinationReference, and a title, then call MergePullRequestBySquash, MergePullRequestByFastForward, or MergePullRequestByThreeWay with the pull request ID. Approval rules attached to the repository must be satisfied first or the merge call returns PullRequestApprovalRulesNotSatisfiedException.

### What are the rate limits for the AWS CodeCommit API?

AWS enforces per-account, per-region throttling on CodeCommit; data-plane operations like CreateCommit return ThrottlingException when limits are exceeded. The AWS SDKs that Jentic wraps implement exponential backoff automatically.

### How do I open a pull request through Jentic with an AI agent?

Run pip install jentic, then have the agent search for 'open a CodeCommit pull request', load the CreatePullRequest schema, and execute it with the source branch, destination branch, and title. Use PostCommentForPullRequest to add review notes, then MergePullRequestBySquash to land the change.

### Can I limit what my agent is allowed to do with the AWS CodeCommit API?

Yes. Because you run Jentic One yourself, your own rules decide which CodeCommit operations the agent may call and which AWS credentials it uses. CodeCommit routes each operation through the X-Amz-Target header and carries the repository name in the request body rather than the URL path, so you scope access by operation: you can allow read and review calls like CreatePullRequest and CreateCommit while withholding destructive ones such as DeleteRepository and DeleteBranch. The agent can only invoke the operations you have granted it, and the stored access key and secret are never exposed to it.
