Although you can access CodeCommit from the AWS Console, the most efficient way to access it, is via SSH. Assuming you already have an IAM user, as well as Git installed on your local machine, it’s time to setup a SSH connection to CodeCommit by performing the following commands.
- Generate a RSA key pair
- Copy the public key to the clipboard.
- Upload the SSH public key to the AWS IAM Console.
- You’ll receive a SSH Key ID.
- Create a config file
- chmod 600 config
- Test connection
- Clone repo
To get more details regarding SSH access to CodeCommit, visit the AWS docs.
CodeCommit is a version control system hosted in AWS that you can use privately to store and manage your source code, documents or binary files. You can get free (as in beer) unlimited repositories, if you have less than 5 users, and if your storage is less than 50 GB-month, and you have less than 10,000 git requests per month. If you have more than 5 users, it’s $1 a month per user. Still not bad. Here’s CodeCommit pricing.
Create a repository in CodeCommit via the Console or the CLI.
aws codecommit create-repository --repository-name myrepo --repository-description "My repository"
Create in another region.
aws codecommit create-repository --region us-west-2 --repository-name myrepo --repository-description "My repository"