Table of contents
We'll be learning to make 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 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.
Step 1: Go to the CodeCommit from the AWS search box. Click on Create repository
.
Enter the details like the "Repository name" and "Description" and click on create
button.
The repository will be created successfully as shown below.
Step 2: Now we need to set up GitCredentials in AWS IAM.
Create a new user. Then click on the user and navigate to the "Security Credentials"
Come down to the "HTTPS Git Credentials for AWS CodeCommit". Click on Generate credentials
.
Make sure to download these credentials in the system for further use.
HTTPS Git Credentials will appear like this in the user's security credentials.
Now add the permission of AWSCodeCommitPowerUser to the user so that there will no error occurs when cloning this repository in the local system via credentials.
Step 3: Now clone the HTTP URL of the repository in this way.
Step 4: Open the Virtual Studio Code editor. Paste here cloned HTTP URL
and enter.
Then it will ask to select Repository destination.
After selecting the repository destination, the Git Credential Manager window pops up. Put your downloaded credentials here.
Task-02
- Add a new file from local and commit to your local branch.
Open the Folder in VS code. Make a new file "index.html" & write a sample code in it and save it as well.
<!DOCTYPE html>
<h1>This is a demo app1</h1>
Check the git status then git add and git commit to the local branch.
- Push the local changes to the CodeCommit repository.
Push local changes to our CodeCommit repo using git push origin master
command.
It will appear successfully in the CodeCommit repo as shown below.
That's all guys, hope it will help you.
Reference: video
Thanks for reading my articles.
Keep upskilling and stay healthy.
Peace out!!