CI/CD Pipeline On AWS (Part -1) CodeCommit

CI/CD Pipeline On AWS (Part -1) CodeCommit

#90 Days of DevOps Challenge - Day 50

What is CodeCommit?

AWS CodeCommit is a fully managed source code version control service provided by Amazon Web Services (AWS). It enables developers to securely store and manage their private Git repositories in the cloud.

Key features and characteristics of CodeCommit include:-

  1. Version Control: CodeCommit provides a scalable and highly available Git repository that supports the standard Git command set. It allows you to track changes, manage branches, and collaborate with team members using familiar Git workflows.

  2. Security and Access Control: CodeCommit ensures secure access to your code repositories. It integrates with AWS Identity and Access Management (IAM), allowing you to define fine-grained access control policies for users and groups. It also provides encryption at rest and in transit to protect your code.

  3. Collaboration and Integration: CodeCommit supports collaboration and integration with other AWS services and development tools. You can easily integrate CodeCommit with AWS CodePipeline for building continuous delivery workflows. It also integrates with AWS CodeBuild, AWS CodeDeploy, and third-party Git tools and IDEs.

  4. Scalability and Availability: CodeCommit is designed for scalability and high availability. It automatically scales to handle large repositories and concurrent user access. It also replicates your code repositories across multiple AWS availability zones to provide redundancy and durability.

  5. Code Reviews: CodeCommit supports code review workflows by integrating with AWS CodeGuru Reviewer. This enables automated code review and analysis to provide feedback on code quality, best practices, and potential issues.

  6. Notifications and Triggers: CodeCommit allows you to set up event notifications and triggers using AWS Lambda functions or Amazon SNS (Simple Notification Service). You can trigger actions based on repository events such as code pushes, branch creation, or pull requests.

  7. Integrated with AWS Services: CodeCommit seamlessly integrates with other AWS developer services. You can use CodeCommit as the source repository for AWS CodePipeline, AWS CodeBuild, and AWS CodeDeploy to create end-to-end continuous integration and deployment pipelines.

By using CodeCommit, developers can store and manage their source code securely, collaborate effectively, and integrate with other AWS services to streamline their software development processes.

Task-01 :

  • Set up a code repository on CodeCommit and clone it on your local.

  • You need to set up GitCredentials in your AWS IAM.

  • Use those credentials in your local and then clone the repository from CodeCommit

Step 1:- First we need to go CodeCommit service and click on Repository -> Create repository

Need to give the repository name and click on create

Now we can see that repository created

If need to go inside the repository we can see that we can't use root account for that we need to use IAM User account

Step 2:- we need to create I AM user and need to set up GitCredentials in your AWS IAM.

We have created I AM user already and we need to go to the Security credentials

We need to go to HTTPS Git credentials for AWS CodeCommit -> click on Generate credentials

After clicking on Generate credentials it will look like below

Now we need to login with I Am User

Step 3:- Now we need to Use those credentials in your local and then clone the repository from CodeCommit

Now we need to go inside the CodeCommit repository and click on HTTP ->Clone URL-> Clone HTTPS

Open a terminal on your local machine.

Navigate to the directory where you want to clone the repository.

Run the following command:-

  git clone <your-codecommit-repo-clone-https-url>

The credential screen will pop up so we need to give the password which we have created

Now we can see that below folder is created

Task-02 :

  • Add a new file from local and commit to your local branch

  • Push the local changes to the CodeCommit repository.

Step 1:- We need to Add a new file from local and commit to your local branch

Step 2:- We need to Push the local changes to the CodeCommit repository.

Devops#devops,#90daysofDevOps

Thank you for reading!! I hope you find this article helpful!!

if any queries or corrections to be done to this blog please let me know.

Happy Learning!!

Saikat Mukherjee

Printable, customizable thank you card templates | Canva

Did you find this article valuable?

Support Saikat Mukherjee by becoming a sponsor. Any amount is appreciated!