Getting started AWS CodeCommit

Posted: | Last updated: | 3 minute read

Inception: Overview of AWS CodeCommit, features, setup CodeCommit, creating a repo, creating a file through AWS Console. This will help in starting your journey from AWS CodeCommit to fully automated CodePipeline a complete lifecycle of DevOps.

AWS CodeCommit is managed version control service hosted by Amazon Web Services. You can use it to privately store and manage source code and any other asset like document and binary files in the cloud. Its based on github.

Package

CodeCommit is Highly Secure, and Highly Scalable managed source control service hosted provided by AWS. It’s a private Git repository hosted on cloud.

Features of AWS CodeCommit

  • Fully managed service: CodeCommit is a managed service hosted on AWS. Its highly scalable and durable service. As its fully managed service, hence you need not worry about administration, provisioning hardware, installing software, configuration, or any kind of update.
  • Securely code storage: CodeCommit is encrypted with customer specific key at rest and transit both, hence it’s secure.
  • Code collaboration: CodeCommit is based on Github, and it supports feature like Pull Request, Review & Comment, Branching, Notification etc, which helps in code collaboration at work.
  • Easily scalable version control system: CodeCommit supports repositories with a large number of files, branches, files in large size, a lengthy revision history.
  • Store anything, anytime: CodeCommit gives you unlimited storage in your repository, and any file type you can store. Its storage backend is S3.
  • AWS and third-party service integration: CodeCommit is managed and integrated service with AWS’s other services, which helps you in automating faster and achieving compliance and security goals. Click here for a list of AWS services and product integrations with CodeCommit.
  • Easy migration: You can easily migrate from any git based repository to CodeCommit or move out from CodeCommit to any other git based reposirity, hence there is not vendor lock-in with CodeCommit.
  • You already know it: CodeCommit supports git commands, hence you already know how to work with CodeCommit. On top of this, AWS also provides AWS CLI commands and APIs.

Following are the steps to Setup you CodeCommit repository!

Creating a repository

Following are the steps to setup your first AWS CodeCommit reposiroty.

  1. Login to AWS Console
  2. Select Region in which you want to create the repository.
  3. Click on Services on top, search for CodeCommit, and click on the service link.
  4. Click on Repositories link, and then click on Create Repository button to create a repository.
  5. Now enter the Repository name, and Description (optional), Add Tags (optional), and click on Create button
  6. Your empty CodeCommit repository is ready, and your repository URL to clone the repository is provided for HTTP and SSH both.

Creating a file on AWS CodeCommit console

After creating the empty repository on CodeCommit, it multiple ways to push your code or file to repository. You can create a new file directly on AWS Console or upload a file through console to UI. Or you can setup a HTTP, SSH, or HTTPS (GRC) connection from your local machine to AWS console.

Lets see how to create a new file in this article for now. You can find more articles and blog on how to setup HTTP, SSH, and HTTPS (GRC) client to pull and push code/file in CodeCommit.

Following are the steps to create a new file in CodeCommit.

  1. Assuming that you are on AWS CodeCommit console.
  2. Click on repository name
  3. Find Add file button and select Create file option
  4. In the info text-area type or paste your code/contents.
  5. Enter the File name
  6. Enter your name in “Author name” text field.
  7. Enter your email ID in “Email Address” text field.
  8. Enter the commit message in “Commit message - options” text area.
  9. Click on “Commit changes” button to commit the changes.

As you, direclty committed the changes into the master branch, hence you will see file, when you will click on repository name. You can view source, or edit the file.

Conclusion: You have a fair understanding of AWS CodeCommit, its feature and how to create a CodeCommit repo etc. In future blogs you will learn, how to create a IAM user, Setup Group and Policy and setup HTTP, SSH, and HTTPS (GRC) connection.