1

What is the best practice regarding the number of CodeStar connections? Is it okay to reuse one CodeStar connection with all CodePipelines? Is there any benefit of creating new connection resources with different pipelines?

matheusopedro
  • 128
  • 1
  • 13
Sujith C P
  • 105
  • 1
  • 11

1 Answers1

1

Yes, it is possible.

Let's say you have a Github organization with 50 application repositories. You'll want a CodePipeline for each of these repos, but you can have only one CodeStar connection that's allowed to read all of the 50 repositories in the organization.

In the project I'm currently working on, we have approximately 150 CodePipelines that get the code from repos across 4 organizations. For each of theses orgs, we have a CodeStar Connection.

This tutorial is a good starting point.

matheusopedro
  • 128
  • 1
  • 13
  • 1
    Have you ever came across, or is there a scenario where you have to recreate a connection? I see an issue there because I will then have to update all the pipelines because the new connection will have a different ARN. – Sujith C P Apr 13 '23 at 07:09
  • I've had that scenario a couple of times. I manage all my pipelines with cloudformation templates. The codestar connection ARN is parameterized in the pipeline template, so I just need to change in one place and execute an update stack . – matheusopedro Apr 13 '23 at 12:54