Newsletter

AWS CodeCommit Essentials: Building and Pushing Your Repositories

Scroll down
Ukeme David Eseme
Ukeme David Eseme
I`m a

January 11, 2024

14:32

user
AWS CodeCommit

AWS CodeCommit is a secure and scalable version control service that plays a pivotal role in modern software development workflows. At its core, CodeCommit enables teams to securely store and manage their source code repositories in the cloud, providing a reliable and accessible collaboration platform.

Its significance lies in fostering seamless collaboration among developers, enabling version control for projects of any scale, and facilitating efficient code deployment processes.

By offering a fully managed, highly available, and Git-compatible repository system, AWS CodeCommit eliminates the complexities of maintaining infrastructure, allowing teams to focus on what matters most: writing code, collaborating effectively, and accelerating the pace of software delivery.

In essence, CodeCommit is a cornerstone for building robust, collaborative, and scalable development pipelines in the cloud, ushering in a new era of agility and innovation for software development teams.

Creating a repository

1. Sign in to your AWS Console

AWS Console

2. Search for CodeCommit and click on it

Search for codecommit

3. On the CodeCommit dashboard, click on the  “Create Repository” button.

create repository

3. For the repo settings, insert the project name and description, then click on create

Connection steps

Step 1: Prerequisites

Download Git
You must use a Git client that supports Git version 1.7.9 or later to connect to an AWS CodeCommit repository. 
Download here

Attach IAM Policy
You must have an AWS CodeCommit managed policy attached to your IAM user.

1. Open the IAM console at https://console.aws.amazon.com/iam/.

2. In the IAM console, in the navigation pane, choose Users, and then choose the IAM user you want to configure for CodeCommit access.

3. On the Permissions tab, choose Add Permissions.

4. In Grant permissions, choose Attach existing policies directly.

5. From the list of policies, select AWSCodeCommitPowerUser or another managed policy for CodeCommit access

IAM permissions
Attach CodeCommit Policy
Step 2: Git credentials

In your IAM User dashboard, click on the Security Credentials section, then scroll down to HTTPS Git credentials for AWS CodeCommit .

Click on generate credentials, then copy or download credentials

generate http credentials
generated credentials
Step 3: Clone the repository

Clone your repository to your local computer and start working on code. Run the following command:

git clone https://git-codecommit.us-east-1.amazonaws.com/v1/repos/project-metis

If you already have a git repository on Github, and you would like to  push existing code to Codecommit.

Then add the codecommit uri as a remote repository in your IDE

git remote add codecommit change-this-to-your-codecommit-uri

When you push to the repo, add the username and password generated 

Finally…. Check Codecommit console for the updates.
codecommit update
Posted in AWS, devtools
Write a comment
Ukeme.Us © 2023 All Rights Reserved.
Email: ukemzyreloaded@gmail.com
Write me a message
Write me a message

    * I promise the confidentiality of your personal information