跨区域代码部署错误。(AWS Codepipeline)

Cross region code deploy error.(AWS Codepipeline)

我尝试使用 AWS CodePipeline 从 ap-southeast-1 跨区域部署到 ap-northeast-1。 但是,部署阶段发生了以下错误。 我将 s3 设置为对 CodeStarWorker-test-ToolChain 的完全访问权限。


ReplicationStatus 工件的复制 'test-BuildArtifact'
失败:无法从
复制工件 source_backet 在 ap-southeast-1
到 ap-northeast-1 中的 dest_backet:检查源和目标
工件桶存在并且
arn:aws:iam::xxxxxxx:role/CodeStarWorker-test-ToolChain 有
访问它的权限。


我在下面的配置中设置了部署管道。 有没有人有同样的错误并且知道预订?

               {
                 "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
     }

当我看到这个错误时,它是两件事之一。

  1. 您没有将 S3 存储桶复制到第二个区域中使用的存储桶。 https://docs.aws.amazon.com/AmazonS3/latest/dev/crr.html
  2. 您的步骤 运行ning 在复制完成之前。

如果是后者,我总是能够重新运行 该步骤并成功。似乎是 S3 复制速度不够快的问题。