aws / git-remote-codecommit

An implementation of Git Remote Helper that makes it easier to interact with AWS CodeCommit
Apache License 2.0
271 stars 38 forks source link

Need Access to CodeCommit Repo from Different Account #19

Open awsGruher opened 4 years ago

awsGruher commented 4 years ago

Hi CodeCommit team,

I am trying to use a CodeCommit repo for an Amplify App, which is being spun up in CloudFormation. I am able to attach a Github repo to the app using an access token (can be generated through developer settings in Github) but I would like to use CodeCommit. I would also like to deploy that CloudFormation template in different accounts from where that CodeCommit repo lives. I have tried attaching an IAM role to the Amplify app but got the error "Requested repository not found" after providing the repo's HTTP URL. I don't believe this is currently supported because CloudFormation only checks your account for the repo (repo URL's in CodeCommit do not point to a specific AWS account and are not globally unique).

Arn: none

Thanks, Ben

shubhamoscar commented 3 years ago

It looks like you are performing push to an AWS Account, which does not have your required repository. You will be required to create the repository first. https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-create-repository.html in the other account and then assume a role that allows access to push to that repository in that AWS Account.