Table of contents
What if I tell you, in next 4 days, you'll be making a CI/CD pipeline on AWS with these tools.
Code-commit
Code-build
Code-deploy
Code-pipeline
S3
What is Code-commit ?
- 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 :
1 . Go to AWS management console and search for Code commit your interface will see like this
2 . Now right side you will see create repository click on it and write your Repository name as Day-50-Code-Commit
and write Description as This is Day-50 Code Commit repository and rest of them all keep it as default and click on Create.
Here you will get an warning, You are signed in using a root account. You cannot configure SSH connections for a root account, and HTTPS connections for a root account are not recommended. Consider signing in as an IAM user and then setting up your connection. To solve this you create a IAM User.
4 . Now in your AWS management console search for IAM and your interface will see like this
5 . On the interface you will see User Click on it and click on Create user and in User details you need to write your User name as Day-50-IAM-User-Code-Commit and select Provide user access to the AWS Management Console and select I want to create an IAM user and select Custom password and write your password and click on Next.
6 . After that you have to select the Attach policies directly and in the permission policies search for AWSCodeCommitFullAccess and click on Next and click on Create User.
7 . Now click on Download .csv file to download your IAM Username and Password.
8 . After that come back to IAM Console and click on user and select your user which you created on the screen you will see Security credentials click on it and scroll down you will see HTTPS Git credentials for AWS CodeCommit in that click on Generate credentials and click on Download credentials.
9 . After that to clone your repository in your local machine come back to your CodeCommit console and click on repository which you created on the right side you will see Clone URL click on it and select Clone HTTPS and copy that link which you see on the screen and past it some where to use further.
9 . Then after goto your local machine and update your system and using git clone clone the repository which you copied from codecommit console you can use this commands.
sudo apt-get update && sudo apt-get upgrade -y
git clone <Past CodeCommit Clone HTTPS link>
10 . After cloning your repository it will ask to past your CodeCommitusername and password which you downloaded a file called Generate credentials and list file and see your repository is came into your local machine or not**.**
Task-02
1 . After cloning your repository enter in to your repository and write the html file.
<!DOCTYPE html>
<html>
<body>
<h1>Day-50</h1>
<p>AWS CodeCommit.</p>
</body>
</html>
2 . Now Add and Commit the file using git command.
git add <filename>
git commit -m "your message"
3 . Now check your repository is in which branch and push your file in AWS CodeCommit console using git command and it will ask CodeCommit credentials past it your credentials.
git branch
git push origin master
4 . Now come to your CodeCommit console and refresh the page and you will see your index.html file which you created in local machine.
This completes the tasks for Day 50. Stay tuned for the next steps in setting up your CI/CD pipeline on AWS!
Happy Learning
Thanks For Reading! :)
-Sri Parthuππ₯