1: CodeCommit Details
Basic actions:
- Create repo:
$ aws codecommit create-repository --repository-name rad-repo-name
- View a repo:
get-repository
- List repos:
list-repositories
- Delete repo(s)
$ aws codecommit delete-repository --repository-name rad-repo-name
Commands are pretty literal!
Data Security on CC:
- Data is encrypted at rest (managed) AND in transit (SSH, HTTPS)
- CodeCommit uses KMS to manage keys.
- No scale/availability-related security holes; it’s managed
- “CodeCommit Power User” role gives full access, minus create/delete repos
- Maybe not everyone should have permission to push to main..!
Connecting:
You can use SSH or HTTP to interact with git repos on CodeCommit.
To use SSH, you have to tweak “SSH public keys for AWS CodeCommit” in IAM.
- Generate an SSH key pair on the dev box.
- Upload the SSH public key to IAM (codeCommit section for your user).
- Grab the new “SSH Key ID” from IAM - that’s your “User” for SSH.
- Edit your ssh config file ("~/.ssh/config" on mac) to contain something like this:
Host git-codecommit.*.amazonaws.com
User SSH_KEY_ID_FROM_IAM
IdentityFile ~/.ssh/id_rsa (or other private key loc)
Misc. Git Fundamentals:
If you didn’t already know, branches are good for:
- Building new features
- Fixing bugs
- Separating work
- Without disrupting the main branch
More on common git workflows on Atlassian’s website.