1 Answer
- Newest
- Most votes
- Most comments
0
Note that CodeStar Connection does not officially support sharing across accounts. As a result, there is no direct way to have a CodeStar Connection (CSC) created in AccountA to trigger a CodePipeline in AccountB. CodeStar Connections will only trigger pipelines that are defined in the same account as the CodeStar Connection.
If you don't care about triggering the pipelines, then you can technically achieve this by:
- Creating the CodeStar Connection in AccountA
- Creating an IAM role in AccountA that has a trust policy allowing CodePipeline service in spoke accounts to assume it. Make sure that the permissions policy on this IAM role has
codestar-connections:UseConnection
for the CodeStar Connection created in Step 1. - Use the IAM role from AccountA when defining the Source Action in the CodePipeline which resides in AccountB
answered 2 years ago
Relevant content
- asked 8 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 4 months ago
This won't work. You'll need the CodeStar connection in Account B where AWS CodePipeline pipeline resides.
Also, CodeStar connection can't be shared from other accounts using RAM (Resource Access Manager) as it is not a shareable resource https://docs.aws.amazon.com/ram/latest/userguide/shareable.html