Shawn Mervin

AWS CodeCommit

AWS's managed private Git hosting, and the home of Rental Pilot's and Lend Pilot's source code.

Visit aws.amazon.com/codecommitAWS

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.

Working with AWS CodeCommit?

Tell me what you're building. Start a project or see the whole stack.

Got an operation that's outgrown its spreadsheets?

Tell me what your business does and where it's jamming up. If I'm not the right person for it, I'll say so and point you somewhere better.

What to send, and what happens next