Your CI/CD pipeline on AWS - Part-1

2 min read

Cover Image for Your CI/CD pipeline on AWS - Part-1

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.

    Step1: Go to CodeCommit service in AWS

    Step2: Create a New Repo

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

    Step1: Go to IAM on AWS

    Step2: Set permission as Attach policies directly

    Step3: Review and create

    Step4: Set Git credential(click on security credential) and navigate to HTTPS Git Credential and click on generate credential

    and Save it by clicking download credentials

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

    Step1: click on Clone URL(HTTPS)and copy it

    and clone the repo

      git clone <repo-url>
    

    Step 2: Enter username and password from downloaded credential and Done!!

    you can see that "codeDev" is cloned to the local directory.

Task-02 :

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

    Step1: Add changes to the dalocal file and commit changes

    Step2: push the commits to the remote URL

      git push -u origin master
    

    It will ask for a username and password, copy the file downloaded credentials and paste into it.

  • Push the local changes to the CodeCommit repository.

    Dode!!

Happy learning!!