Is it possible to clone a CodeCommit repository from a different account in a CodeBuild project?

0

I have a CICD pipeline that is implemented with CodePipeline. The purpose of this pipeline is just cloning terraform code from a CodeCommit repository and deploy the resources specified in the terraform configuration. The problem is some of the terraform configurations are located in another CodeCommit repository in the other account and we want to clone the code from it.

What I already know: I can clone the CodeCommit repository in the same account with the default instance profile in CodeBuild environment.

What I want to know: how can I clone the CodeCommit repository in a different account in CodeBuild environment? In order to specify a repo from a certain account, is using the aws config profile the only way to achieve this?

Andy Wu
已提问 1 个月前150 查看次数
1 回答
1

Hi Andy,

It certainly is possible to clone a repository from a different account. The documentation page gives the details on how to accomplish this.

Please follow the steps on the page and let me know if that works. I can also help you clone the repository.

Sincerely, Mukul Dharwadkar

profile picture
已回答 1 个月前
profile picture
专家
已审核 1 个月前
  • Hi Mukul,

    Thank you for sharing the documentation page. I followed the steps and can verify it works by creating an IAM user in the Account B for this specific purpose. However, I would like to know if it is also possible to use the instance profile in the CodeBuild environment (or vm) so that I don't have to create a default profile with a newly created IAM user.

    Best regards, Andy

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则

相关内容