- Newest
- Most votes
- Most comments
hello,
Use CodePipeline's Cross-Region Support
AWS CodePipeline supports cross-region pipelines. You can create a pipeline in ap-south-1 and add a source action that points to the CodeCommit repository in us-east-1.
To do this:
- Create a new pipeline in ap-south-1.
- Add a source action of type "AWS CodeCommit".
- In the "Repository" section, select "Another AWS account" and enter the repository details (repository name, account ID, and region: us-east-1).
- Configure the authentication method (e.g., IAM role).
IAM Permissions:
Ensure the IAM role used by the pipeline has the necessary permissions:
- codecommit:GitPull
- codecommit:BatchGetRepositories
Hello.
As stated in the document below, source actions (such as CodeCommit) do not support cross-region actions.
https://docs.aws.amazon.com/codepipeline/latest/userguide/actions-create-cross-region.html
You cannot create cross-Region actions for the following action types:
- Source actions
- Third-party actions
- Custom actions
To support cross-region deployment, CodeCommit and CodePipeline must be created in the same region, and CodeDeploy must be created in another region.
In other words, in your case, CodeCommit is located in us-east-1, so you need to configure CodePipline to be created in us-east-1 and CodeDeploy to be created in ap-south-1.
Relevant content
- asked 2 years ago

Hi Sandeep, Thanks for your response. I have gone through above steps but the is no option to select the repo from another account. I have tried to create pipeline Create a new pipeline in ap-south-1. Add a source action of type "AWS CodeCommit". In the "Repository" section, select "Another AWS account" and enter the repository details please let me know if I am missing any thing.
use this method once hope it works
Using AWS CLI:
bash aws codepipeline create-pipeline --pipeline-name <pipeline-name> --role-arn <IAM-role-ARN> --artifact-store <artifact-store> --region ap-south-1
bash aws codepipeline create-pipeline --pipeline-name <pipeline-name> --stage-configuration [ { "Name": "Source", "Actions": [ { "Name": "CodeCommit_Action", "ActionTypeId": { "Category": "Source", "Owner": "AWS", "Provider": "CodeCommit" }, "RunOrder": 1, "Configuration": { "RepositoryName": "<repo-name>", "BranchName": "<branch-name>", "OAuthToken": "", "PollForSourceChanges": "true", "CrossAccount": "true", "Account": "<another-account-ID>" } } ] } ]
Replace <pipeline-name>, <IAM-role-ARN>, <artifact-store>, <repo-name>, <branch-name>, and <another-account-ID> with your values.