Day 50 Task: Your CI/CD pipeline on AWS - Part-1

Day 50 Task: Your CI/CD pipeline on AWS - Part-1

ยท

2 min read

๐Ÿ”ถ What is CodeCommit?

  • CodeCommit is a managed source control service by AWS that allows users to store, manage, and version their source code and artifacts securely and at scale. It supports Git, integrates with other AWS services, enables collaboration through branch and merge workflows, and provides audit logs and compliance reports to meet regulatory requirements and track changes. Overall, CodeCommit provides developers with a reliable and efficient way to manage their codebase and set up a CI/CD pipeline for their software development projects.

๐Ÿ”ถ Task-01 :

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

    1. Log in to AWS Management Console and go to CodeCommit.

    2. Create a secure repository to store and share your code. Begin by typing a repository name and a description for your repository.

    3. Repositories Created.

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

    We need to set up Git credentials that AWS CodeCommit will use for authentication.

    1. Go to the AWS IAM Console.

    2. Create a new IAM user or choose an existing one. Add the necessary permissions for CodeCommit, typically AWSCodeCommit_FullAccess.

    3. In the IAM user's "Security credentials" tab, generate HTTPS Git credentials. Note down the HTTPS Git credentials username and password.

    4. Git Credentials Created.

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

    Clone the Repository

    1. Open the terminal and navigate to the directory where you want to clone the CodeCommit repository.

    2. Run the following command, replacing <repository-url> with the URL of your CodeCommit repository:

        git clone https://<repository-url>
      
    3. When prompted, enter the Git credentials (username and password) you generated in the IAM user. This will authenticate your local Git client with CodeCommit.

๐Ÿ”ถ Task-02 :

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

        git status
        git add . # to add new file 
        git commit -m "Added new file named as file.txt"
    

  • Push the local changes to the CodeCommit repository.

        git push origin master
    

    Now check the code commit Repositories and verify your push.

Happy Learning :)

If you find my blog valuable, I invite you to like, share, and join the discussion. Your feedback is immensely cherished as it fuels continuous improvement. Let's embark on this transformative DevOps adventure together! ๐Ÿš€ #devops #90daysofdevop #AWS

ย