D. Yamashita
D. Yamashita

Reputation: 23

Cross region code deploy error.(AWS Codepipeline)

I try to cross region deploy from ap-southeast-1 to ap-northeast-1 using AWS CodePipeline. But, an below error is occurred deploy phase. I set s3 full access to CodeStarWorker-test-ToolChain.


ReplicationStatus Replication of artifact 'test-BuildArtifact'
failed: Failed replicating artifact from
source_backet in ap-southeast-1
to dest_backet in ap-northeast-1: Check source and destination
artifact buckets exist and
arn:aws:iam::xxxxxxx:role/CodeStarWorker-test-ToolChain has
permission to access it.


I set below config to deploy of pipeline. Does any one have same error and know reservation?

               {
                 "name": "Deploy", 
                 "actions": [
                     {
                         "region": "ap-northeast-1",
                         "inputArtifacts": [
                             {
                                 "name": "test-BuildArtifact"
                             }
                         ], 
                         "name": "GenerateChangeSet", 
                         "actionTypeId": {
                             "category": "Deploy", 
                             "owner": "AWS", 
                             "version": "1", 
                             "provider": "CloudFormation"
                         }, 
                         "outputArtifacts": [], 
                         "configuration": {
                             "ActionMode": "CHANGE_SET_REPLACE", 
                             "ChangeSetName": "pipeline-changeset", 
                             "RoleArn": "arn:aws:iam:: xxxxxxx:role/CodeStarWorker-test-CloudFormation", 
                             "Capabilities": "CAPABILITY_NAMED_IAM", 
                             "StackName": "awscodestar-test-lambda", 
                             "ParameterOverrides": "{\"ProjectId\":\"test2\",
 \"CodeDeployRole\":\"arn:aws:iam:: xxxxxxx:role/CodeStarWorker-test-CodeDeploy\"}",

                             "TemplateConfiguration": "test-BuildArtifact::template-configuration.json", 
                             "TemplatePath": "test-BuildArtifact::template.yml"
                         }, 
                         "runOrder": 1
                     }, 
                     {
                         "region": "ap-northeast-1",
                         "inputArtifacts": [], 
                         "name": "ExecuteChangeSet", 
                         "actionTypeId": {
                             "category": "Deploy", 
                             "owner": "AWS", 
                             "version": "1", 
                             "provider": "CloudFormation"
                         }, 
                         "outputArtifacts": [], 
                         "configuration": {
                             "StackName": "awscodestar-test-lambda", 
                             "ActionMode": "CHANGE_SET_EXECUTE", 
                             "ChangeSetName": "pipeline-changeset"
                         }, 
                         "runOrder": 2
                     }
                 ]
             }
         ], 
         "artifactStores": {
             "ap-southeast-1": {
                 "type": "S3", 
                 "location": "source_backet"
             },
             "ap-northeast-1": {
                 "type": "S3", 
                 "location": "dest_backet"
             }
         }, 
         "name": "test-Pipeline", 
         "version": 1
     }

Upvotes: 2

Views: 1343

Answers (1)

Jason Wadsworth
Jason Wadsworth

Reputation: 8887

When I've seen this error it's been one of two things.

  1. You don't have your S3 bucket replicated to the bucket being used in the second region. https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html
  2. Your step is running before the replication is complete.

If it's the latter I'm always able to re-run the step and it succeeds. Seems to be an issue with the S3 replication not moving fast enough.

Upvotes: 0

Related Questions