Your CI/CD pipeline on AWS - Part-1 πŸš€ ☁

This is Day 50 of #90daysofdevops challenge

Your CI/CD pipeline on AWS - Part-1 πŸš€ ☁

What if I tell you, in next 4 days, you'll be making a CI/CD pipeline on AWS with these tools.

  • CodeCommit

  • CodeBuild

  • CodeDeploy

  • CodePipeline

  • S3

What is CodeCommit?

CodeCommit is a managed source control service by AWS that allows users to store, manage, and version their source code and artefacts 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 1: Configuring GitCredentials for CodeCommit and Cloning a Repository

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

  • Login and Open the AWS Management Console and navigate to the CodeCommit service.

  • Create a repository by clicking on the β€œCreate repository” button.

  • Enter a name for your repository give description, default branch name, and repository visibility.

  • demo-repo Successfully Created.

Now, Configure Git Credentials in AWS IAM:

  • Go to the IAM console.

  • Click on Users in the left-hand menu, and then click on your username.

  • In permissions, Add permissions for git access for IAM user.

  • Search and select β€œAWSCodeCommitFullAccess” and β€œAWSCodeCommitPowerUser”.

  • Now, In Security credentials section scroll down to the β€œHTTPS Git credentials for AWS CodeCommit”, click on β€œGenerate credentials”.

  • Now, Navigate to the repository we created earlier and let's add a file there.

  • Click on "Create file" and give the info.

  • Copy the repository url.

  • Open the server terminal and use the git clone command to clone the repository from CodeCommit to the server.
git clone <your-codecommit-repo-clone-https-url>
  • You will be prompted to enter your Git credentials. Enter the username and password that you downloaded earlier.

Task 2: Adding and Pushing Changes to a CodeCommit Repository

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

  • Create a new file.

  • Check status using command β€œgit status”.

  • Now, Add the file using git add command and commit the changes.

- Push the local changes to CodeCommit repository.

  • To push the local changes to CodeCommit repository simply use the command given below:
git push origin <branch name>

  • Verify that the changes have been pushed to the CodeCommit repository:

"Thank you for enjoying my DevOps blog! Your positive response fuels my passion to dive deeper into technology and innovation.

Stay tuned for more captivating DevOps articles, where we'll explore this dynamic field together. Follow me on Hashnode and connect on LinkedIn (https://www.linkedin.com/in/som-shanker-pandey/) for the latest updates and discussions.

Did you find this article valuable?

Support Som Pandey's blog by becoming a sponsor. Any amount is appreciated!

Β