AWS has its own Git repository system called CodeCommit. Here is what AWS have to say about it:
“CodeCommit is a secure, highly scalable, managed source control service that hosts private Git repositories. CodeCommit eliminates the need for you to manage your own source control system or worry about scaling its infrastructure. You can use CodeCommit to store anything from code to binaries. It supports the standard functionality of Git, so it works seamlessly with your existing Git-based tools.”
So basically it is AWS’ answer to GitHub. As I am currently getting to grips with AWS I thought it was worth taking a look at CodeCommit, which is free for the first 5 (five) active users. This free tier includes unlimited repositories, 50GB per month of storage and 10,000 Git requests per month.
An “active user” is any unique AWS identity (IAM user/role, federated user or root account). So my CodeCommit activity will probably be limited to 2 (two) active users – my root account and my IAM user. After the first 5 active users AWS starts to charge $1 per month per additional active users, who then get unlimited repositories, 10GB-month of storage and 2,000 Git requests per month.
Unused storage / Git requests do not accumulate, if the limits are met then AWS starts to charge an addition $0.06 per GB per month and $0.001 per Git request.
CodeCommit Repository Names
AWS CodeCommit repository names can contain up to 100 alphanumeric characters and can contain dashes and underscore characters. The name cannot end with the suffix .git.
Creating A Repository (AWS Web Management Console)
Open up https://console.aws.amazon.com/codesuite/codecommit/home, check your region (top right of the screen) is correct and press “Create Repository”.

This is also the screen that allows you to view, delete and manage your CodeCommit repositories.
CodeCommit will ask you to name the repository and to add a description (optional, but recommended). As always I recommend that you add some sensible tags to the resource as well to make it easier to track / report on later.

Pressing “Create” should hopefully result in a success screen.

And with the repository successfully created we can use the AWS web management system to add / delete files and create new branches.

Creating A Repository (AWS CLI)
I like the AWS web management system, however I much prefer the AWS CLI. Creating a repository via the AWS CLI requires the following:
aws codecommit create-repository –repository-name geektechstuff_demo_2

Replacing “geektechstuff_demo_2” with the name you want for your repository. Although this creates a repository I would recommend using the following command instead:
aws codecommit create-repository –repository-name geektechstuff_demo_3 –repository-description “a demo repository from geektechstuff” –tags Purpose=demo

This creates a repository with a name, description and a tag. I have coloured the text red that is text I have created.
Viewing Repositories
As mentioned earlier, repositories can be created, viewed, edited and deleted via https://console.aws.amazon.com/codesuite/codecommit/home. As the below image shows, the screen will show all repositories linked to the AWS account including those created via the AWS CLI.

From the AWS CLI a single repository’s details can be viewed with the command:
aws codecommit get-repository –repository-name geektechstuff_demo
Replacing “geektechstuff_demo” with the repository’s name.

To list all repositories linked to the AWS account use:
aws codecommit list-repositories

Deleting Respositories
All done with a repository? It can be deleted via the AWS web management console or it can be done with the AWS CLI:
aws codecommit delete-repository –repository-name geektechstuff_demo
Replacing “geektechstuff_demo” with the repository’s name.

You must be logged in to post a comment.