AWS CodeCommit is a source control service by Amazon that enables members of a team to collaborate on a highly scalable and ultimately secure platform. Generally, the AWS CodeCommit acts as a source code storage or repository for Amazon Web Services public cloud customers.
A fully-managed source control service that hosts secure Git-based repositories, similar to Github.
You can create your own code repository and use Git commands to interact with your own repository and other repositories.
You can store and version any kind of file, including application assets such as images and libraries alongside your code.
The AWS CodeCommit Console lets you visualize your code, pull requests, commits, branches, tags and other settings.
Can host secure and highly scalable private Git repositories.
integrates with AWS CodePipeline and AWS CodeDeploy.
Based on Git
Centralized repository for all code, binaries, images, and libraries
Tracks and manages code changes
Maintains version history
multiple sources can be used to update the stored code
collaboration facilityis also provided
can host private Git repositories
the AWS service is both secured and highly scalable
Maximum Number of repositories per account: 1000
AWS CodeCommit Concepts:
AWS CodeCommit contains an active user, repositories, files, commit, pull requests and an approval rule.
An Active User:
An active user is any unique AWS identity (IAM user/role, federated user, or root account) that accesses AWS CodeCommit repositories during the month. AWS identities that are created through your use of other AWS Services, such as AWS CodeBuild and AWS CodePipeline, as well as servers accessing CodeCommit using a unique AWS identity, count as active users.
Approval Rule:
An approval rule is used to designate a number of users who will approve a pull request before it is merged into your branch.
CodeCommit Repositories
A repository is the fundamental version control object in CodeCommit. It’s where you securely store code and files for your project. It also stores your project history, from the first commit through the latest changes.
It stores code and files for project.
It has project history starting from the very first commit till the latest changes.
repository can also be shared with other users working on the project.
AWS tags is used to easy identification of repositories
With tags, notifications can easily be set to repository users about events
Can change default settings for repository
can create triggers for repository for code push or other events trigger actions
Create empty CodeCommit repository from
AWS CLI
CodeCommit console
CLI also provide facility to add tags to repository during creation
Post repository creation, connect to it and add code.
During first connection, its contents are cloned to local machine.
Can add files to and edit files in a repository directly from CodeCommit console.
CodeCommit Files
A file is a version-controlled, self-contained piece of information available to you and other users of the repository and branch where the file is stored.
It is a version-controlled, self-contained piece of information
Files can be accessed by
repository users
branch storing the file
repository files can be organized similar to directory structure
Changes to file are automatically tracked by CodeCommit
Can compare versions of file and store different versions of a file in different repository branches.
To add or edit a file in a repository, use
-
- Git client
- CodeCommit console,
- AWS CLI
- CodeCommit API.
CodeCommit Commits
Commits are snapshots of contents and changes to repository
commit information is saved for every user
Meta information includes
-who committed the change
-the date and time of the commit
-changes made as part of the commit
tags can be added to commits, for easy identification
In CodeCommit, can:
-Review commits.
-View the history of commits in a graph.
-Compare a commit to its parent or to another specifier.
-Add comments to commits and reply to comments made by others.
CodeCommit console can browse commit history for a repository.
Can also view a graph of commits in repository and its branches over time.
Pull Requests
A pull request allows you and other repository users to review, comment on, and merge code changes from one branch to another.
Pull requests require two branches: a source branch that contains the code you want reviewed, and a destination branch, where you merge the reviewed code.
Create pull requests to let other users see and review your code changes before you merge them into another branch.
Create approval rules for your pull requests to ensure the quality of your code by requiring users to approve the pull request before the code can be merged into the destination branch. You can specify the number of users who must approve a pull request. You can also specify an approval pool of users for the rule.
To review the changes on files included in a pull request and resolve merge conflicts, you use the CodeCommit console, the ‘git diff’ command, or a diff tool.
After the changes have been reviewed and all approval rules on the pull request have been satisfied, you can merge a pull request using the AWS Console, AWS CLI or with the ‘git merge’ command.
You can close a pull request without merging it with your code.
AWS CodeCommit Features
-
Collaborate on code
AWS CodeCommit allows you to collaborate on code with teammates through pull requests, branching and merging. The collaboration on code can implement workflows that contain code reviews and feedback by default and can control the changes of specific branches.
-
High availability and Fully manage
AWS codecommit has a highly scalable, durable architecture and redundant. It is designed to allow repositories highly available and accessible.
In AWS codecommit no need to host, maintain, back up and scale your own source servers. The service helps to scales the growing needs of your projects.
-
Fast Development Life Cycle
The AWS CodeCommit allows you to keep your repositories near to your build, production environment in the AWS cloud. You can just transfer incremental changes than changing the entire application. It also allows you to increase the speed and frequency of your development life cycle.
-
Existing tools usage
AWS CodeCommit supports all Git commands and uses all existing Git tools. You can also use your development environment plugins, graphical clients, continuous integration/continuous delivery system with AWS CodeCommit.
-
Secure
The AWS CodeCommit always encrypts your files in the process of transmission. This AWS CodeCommit is integrated with AWS Identity and Acess management(IAM) that allows customizing user-specific access to your repositories.
Related Posts:
Amazon Web Service – AWS Tutorial