What it is
AWS CodeCommit is a managed source control service from Amazon Web Services that hosts private Git repositories. Developers use the normal Git tools to clone, push and pull, and AWS runs the storage, encryption and availability behind them. There is no separate account or password system to manage; developers authenticate with IAM credentials or Git credentials tied to an IAM user.
Access is controlled with AWS IAM, the same identity system that governs the rest of an AWS account. CodeCommit connects directly to AWS's delivery services, so a push can start a CodePipeline run that builds and deploys with CodeDeploy, all inside one account. Repositories are encrypted at rest and stay inside the AWS Region the account chooses, with activity recorded by AWS CloudTrail.
How I use it
- Rental Pilot's API, web app and phone app are on CodeCommit in us-east-2; Lend Pilot is on CodeCommit too.
- Every push to the API's main branch deploys to the test server through CodePipeline and CodeDeploy.
- The API and phone app are trunk-based; the web app goes through pull requests.
- Pre-push hooks and deploy scripts guard what reaches main and what ships from it.
CodeCommit is the right tool when the code, the servers and the deployment pipeline already live in one AWS account and you want access governed by the same IAM rules. I reach for it for Rental Pilot because the API's pipeline starts from the repository, and keeping both in AWS keeps the moving parts in one place.
Questions
Where is Rental Pilot's code kept?
In private Git repositories on AWS CodeCommit, in the same AWS account as its servers. Lend Pilot's code is on CodeCommit as well.
How does code get from a commit to a server?
For Rental Pilot's API, every push to main runs through CodePipeline and CodeDeploy to the test server. Production deploys are a separate scripted step that refuses to run unless the checkout matches the tip of main.