Your CI/CD pipeline on AWS -Part-1

Your CI/CD pipeline on AWS -Part-1

·

3 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.

You need to set up GitCredentials in your AWS IAM.

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

Access the AWS Management Console and head to CodeCommit. Initiate the repository creation process by selecting "Create repository."

Assign a distinctive name to your repository and proceed to click on 'Create.'

The repository has been successfully established.

To facilitate Git Credentials within your AWS IAM, navigate to the IAM console. Access the Users section in the left-hand menu, followed by your username.

Scroll down to the Security credentials segment.

Within the 'HTTPS Git credentials for AWS CodeCommit' area, opt for 'Generate credentials.'

Download your Git credentials by clicking the 'Download credentials' button and then selecting 'close.'

Your Git credentials are now generated.

Employ these credentials locally to clone the repository from CodeCommit. Inside your CodeCommit repository (created in the previous steps), click on 'Clone URL' on the right-hand side and choose 'Clone HTTPS.'

On your local machine, launch a terminal and move to the directory where you intend to clone the repository. Execute the command:

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

You will be prompted to input your Git credentials—provide the username and password downloaded earlier.

Congratulations! You have successfully established a CodeCommit repository and cloned it locally using Git Credentials in AWS IAM.

Note- Also make sure to give the user, access to CodeCommit

Task-02 :

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

  • Push the local changes to CodeCommit repository.

Create a fresh file in the directory of your local repository.

Check the status of your local repository using the 'git status' command.

Incorporate the new file into your local branch with the following command:

git add <filename>

Commit the alterations to your local branch using the ensuing command:

git commit -m "<your message>"

Push the local modifications to the CodeCommit repository. Push the changes from your local branch to the CodeCommit repository with the following command:

git push origin master

Validate that the changes have been successfully pushed to the CodeCommit repository: Navigate to the CodeCommit repository you established earlier, and you should observe the new file listed in the repository's files.

You can see the content of the file.


Thankyou for reading until here. Happy Learning!