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.
Go to the AWS Management Console, open the CodeCommit console
Click "Create Repository" to create a new repository
- You need to set up GitCredentials in your AWS IAM.
Go to the IAM console and create a new IAM user with programmatic access. Attach the AWSCodeCommitFullAccess
and AWSCodeCommitPowerUser
permissions to the user.
In the "Security credentials" tab, scroll down to the HTTPS Git credentials for AWS CodeCommit. Then, click Generate credentials to get a username and password, then note them down.
- Use those credentials in your local and then clone the repository from CodeCommit.
Go to the CodeCommit console and select your repository. Click on "Clone URL" to get the repository URL. Then, in the terminal, run:
Then, in the terminal, run:
git clone <repository-url>
You will be prompted for your git credentials i.e your username and password.
Task-02 :
- Add a new file from local and commit to your local branch.
- Push the local changes to the CodeCommit repository.
Let's verify our newly created file is in the repository
Thank you