Introducing AWS CodeCommit - Amazon managed SaaS Git
AWS CodeCommit is a version control system, which is managed by Amazon Web Services, where we can privately store and manage assets in the Cloud and integrate with AWS. It is a highly scalable and secure VCS that hosts private Git repositories and supports the standard functionality of Git, so it works very well with your existing Git-based tools.
The following are the benefits of CodeCommit:
- Managed service: CodeCommit is fully managed, distributed, fault tolerant, and carries no administrative overhead. It is elastic (able to adapt to a high workload) and, as mentioned, integrated with other AWS services.
- No limit to storage and file type: We can store as many files as we want, because CodeCommit does not have space limitations. We can store not only source code but also documents and binary files.
- Data and access security: CodeCommit repositories are encrypted while they are in AWS CodeCommit or when getting cloned somewhere. It is also integrated with IAM for user-level or specific API-level security.
- HA (high availability): Whatever data we push into the repository, it will replicate across AZs (Availability Zones).
- Easy migration of Git-based repository: We can easily migrate a remote Git-based repository to AWS CodeCommit.
These are some limitations or drawbacks of self-hosted VCS (BitBucket/GitHub/GitLab), which you won't find in AWS CodeCommit:
- We may have to pay a license fee on a per-developer basis
- We may end up with high hardware maintenance costs and high support staffing costs
- Limitation on the amount and types of files that can be stored and managed
- Limitation on the number of branches, the amount of version history, and other related metadata that can be stored
How to do it...
AWS CodeCommit is configured just like other Git-based repositories, such as GitHub. The following diagram shows how we use a development machine, AWS CLI/AWS Console, and CodeCommit to create and manage a repository:

(Reference: AWS CodeCommit Docs)
The basic workflow is described as follows:
- Using AWS CLI or CodeCommit Console, we can create a CodeCommit repository.
- Post that, use
git clone
in the CodeCommit repository URL on your local development machine. - Once the repository gets cloned into the development machine, make the changes in the repository by adding to or editing the files. After that, enter the
git add
command and put it into the staging area,commit
by giving a change message, and thenpush
it back to the repository. - After that, we can carry out
git pull
to synchronize the code in the AWS CodeCommit repository with our local repository. At this point in time, you will be working with the latest changes and the versions of the files.