Exploring AWS CodeCommit

Ayush Bhat
4 min readMar 16, 2023

First we will start with CI (Continuous Integration) and then step by step we will explore it further.

Continuous Integration

To explain CI in simple words let’s consider an example.

  1. There is a developer who made changes in the code and then push the code to a code repository.
  2. Then a build server or testing server checks the codes as soon as it’s pushed.
  3. After the code is tested, developer is given the feedback about the tests.

Advantages of Continuous Integration

  • Find bugs at earlier stages
  • Feedback is given to the developer quickly
  • It is deployed often so there is no gap in production environment

We have of often hear the term Continuous Delivery and Continuous Deployment and we get easily confused among them so let’s understand this terminology.

(i) Continuous Delivery:

  • It is the ability to deploy often using automation
  • It may involve a manual step to “approve” a deployment

(ii) Continuous Deployment

  • It is fully automated, as the code changes it is being deployed all the way to production
  • No manual need for “approval”

Now let’s see what are various services offered by AWS Cloud for SDLC Automation.

To name a few these are:

  • CodeCommit
  • CodeBuild
  • CodeDeploy
  • CodePipeline

In this blog we will see the working demo for CodeCommit.

By using CodeCommit we can create git repository in AWS Cloud.

  1. We will start by creating a repository in CodeCommit.
AWS CodeCommit

Now give the name to the repository, description and also you can add tag.

2.After creating the repository, the console will advice you to create an IAM USER and then set up connection with the CodeCommit Repo you have created.

3. Now we will create a USER and add the admin access policy to the user group.

Create a USER in IAM
Adding the Policy

4. Save the password.

5. Go to the “Security credentials” tab and generate HTTPS Git Credentials.

HTTPS Git Credentials

6. Credential will be generated save them.

7. Go to the CodeCommit and click on Clone via HTTPS, it will provide you with URL copy that.

8. After copying the URL go to git bash in your local system and clone the repository.

It will prompt for the HTTPS Git Credentials that you have previously stored. Add them and click on ‘OK’.

9. Now change the directory.

10. You can manually copy any file to this directory, and then check the status of the repo, it will show the files untracked.

11. To add the files to the staging area use the below command.

In the next step commit the changes.

12. Finally push the changes. This will make the changes in the CodeCommit Repo.

13. We can see that all the files are in our CodeCommit Repo.

Conclusion

In this blog we learnt about CodeCommit and see the demo for establishing the remote connection with the repo using HTTPS Git Credential.

That’s all for now.

--

--

Ayush Bhat

AWS SAA-C02 | Certified Kubernetes Administrator | Linux Foundation Certified Sysadmin | Ex294 RedHat Certified Engineer