1

I am using AWS CodeCommit with CodePipeline. I have

  • two totally separate AWS accounts, one for test and one for production,

  • identical Code Pipelines setup in each account, each with a corresponding CodeCommit repo.

  • a local code repo on my dev machine.

This allows me to push from the local repo to either the test or production AWS account, depending on what I'm doing.

I'm now in the process of setting up a second local development machine. This feels like a slightly daft question, but

  • Which of my test or production AWS accounts should I regard as my 'repository of record'?
  • What are other people doing in this regard?
  • Is it considered bad practice to have two AWS CodeCommit repositories setup in this way?
  • What is the best practice for totally separate AWS accounts which share the same codebase but have duplicated CodeCommit repos on the two AWS accounts?
4
  • Would the person who voted to close this question please give their reasons? Thanks so much.
    – Journeyman
    Commented Apr 19, 2021 at 13:54
  • +1 to counterupvote this downvoter who seems to think you are capable of mindreading. Community, it is ok when you vote for closing with "needs details or clarity", but if you don't tell the OP which details you think were missing, the OP cannot know.
    – Doc Brown
    Commented Apr 19, 2021 at 15:37
  • @DocBrown just a guess - some of those who tend to downvote silently could probably read this tale
    – gnat
    Commented Apr 19, 2021 at 20:44
  • 1
    Much gratitude to you Doc Brown, for the answer, but also for restoring to me some faith in the StackOverflow/StackExchange community. It seems there's a whole army of people out there ready to flame any question. Even though the question that you have, well, it's the question that you have.
    – Journeyman
    Commented Apr 20, 2021 at 7:04

1 Answer 1

1

Which of my test or production AWS accounts should I regard as my 'repository of record'?

None. If you doing software development in a team, a standard model is to have at least three environments:

  • development
  • test
  • production

Depending on the size of the team or product, you may add another "staging" environment in between, or multiple production environments.

I am not an expert on AWS CodeCommit, hence I cannot tell you whether you need a third AWS account for this, or if you should use one existing account for two of the formentioned environments, or maybe for all three. But the idea should be to use one account with its Git repo for development, as single source of truth, and deploy to the test and production environments by some automated build and deployment process from there.

If those test and production environment really need Git repos on their own seems to be debatable - most Git workflows I know map the test and production releases to separate branches inside the existing repos, there is usually no need to set up three different repos for that.

Of course, with Git as a distributed VCS, there are also workflows possible without any central server, but AFAIK this is not the most popular way of working and may not be the right thing for you.

1
  • Many thanks Doc Brown. I'll investigate AWS CodePipeline and see if I can create builds from a single-source-of-truth AWS Code Commit repo that lives in another AWS account separate from both test and production.
    – Journeyman
    Commented Apr 20, 2021 at 7:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.