AWS CodeCommit
Fully managed source control service for Git repositories
CodeCommit is like GitHub, but fully managed by AWS and deeply integrated with AWS services. It's a Git repository where you store your code, track changes, and collaborate with your team. You get all the Git features (branches, pull requests, merges) plus AWS integration (IAM for access control, encryption at rest, CloudWatch for monitoring). Think of it as a secure, scalable place to store and version your code without managing your own Git server.
CodeCommit is a fully managed Git service. You create repositories, clone them locally, and use standard Git commands (commit, push, pull, branch, merge). CodeCommit integrates with IAM for access control; use IAM users, roles, or federated identities.
Key Capabilities
- Hosts private Git repositories in AWS with automatic, fully managed scaling and no size limits enforced by the service
- Access is controlled entirely through IAM, supporting both HTTPS (via credential helper or service-specific passwords) and SSH key authentication
- Triggers invoke Lambda functions or SNS topics on repository events such as pushes or branch creation
- Pull request workflows support inline code comments, approval rule templates, and required reviewer counts before merging
- Branch protection is enforced through IAM policy conditions, restricting who can push directly to protected branches
- Integrates natively with CodePipeline and CodeBuild as a source stage, triggering pipelines automatically on new commits
Gotchas & Constraints
Gotcha #1: CodeCommit uses IAM for authentication; generate Git credentials or use SSH keys, not AWS console passwords. Gotcha #2: CodeCommit has fewer features than GitHub/GitLab (no built-in CI, limited PR features); pair with CodeBuild and CodePipeline. Constraints: Maximum 2GB file size, maximum 6MB file size for diff/merge operations, and maximum 100 concurrent connections per repository.
A development team uses GitHub but wants tighter AWS integration and better security. They migrate to CodeCommit: create repositories for each microservice, configure IAM policies (developers have read/write, contractors have read-only), and enable encryption with KMS. They use pull requests for code review, requiring 2 approvals before merging to main branch. They create triggers: when code is pushed to main, invoke Lambda to run linting and send SNS notification to Slack. They integrate with CodePipeline, so code pushed to CodeCommit automatically triggers CI/CD pipeline. For compliance, they enable CloudTrail logging to track all repository access and changes. They use CodeCommit's built-in merge conflict resolution for simple conflicts.
The Result
secure code storage, native AWS integration, and full audit trail of code changes.