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
demandé il y a un mois150 vues
1 réponse
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
répondu il y a un mois
profile picture
EXPERT
vérifié il y a un mois
  • 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

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions