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
Steps -
- Create a repository in CodeCommit.
Now, we need to set up Git Credentials in IAM.
Go to IAM > Users > Scroll down to Security Credentials> HTTPS Git credentials for AWS CodeCommit \> Generate Credentials
- Credentials are generated, save them for later use
- Go back to the created repository to get the clone command to clone the repository locally.
- Run the command to clone the repository (Give the credentials that we created when the prompt asks for the credentials)
Task-02 :
Add a new file from local and commit to your local branch.
Push the local changes to the CodeCommit repository.
Steps -
- Add a few files in the locally cloned repository.
Use the git commands to add, commit, and push the changes to CodeCommit.
Run the commands -
git add .
git commit -m "local changes added few files"
git push origin master
- Validate in the AWS Console if the files are pushed to the CodeCommit repository successfully.
Thank you :)
ย