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
질문됨 한 달 전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
답변함 한 달 전
profile picture
전문가
검토됨 한 달 전
  • 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

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠