【问题标题】:AWS CodeBuild DOWNLOAD_SOURCE failedAWS CodeBuild DOWNLOAD_SOURCE 失败
【发布时间】:2020-03-09 06:19:30
【问题描述】:

我正在使用 AWS Code Pipeline 执行部署,我设法仅使用 CodeBuild 执行部署,但是当我将其更改为 S3 源时,部署总是失败并显示错误消息:-
Waiting for DOWNLOAD_SOURCE

正如others 所指出的,我的 CodeBuild 项目是从 CodePipeline 创建的。出于绝望,我还为其分配了对我的 S3 的完全访问权限。但还是没用。

我的 CodeBuild 项目服务角色政策如下:-

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "logs:CreateLogStream",
                "s3:*",
                "logs:PutLogEvents"
            ],
            "Resource": [
                "arn:aws:s3:::codepipeline-ap-southeast-1-625xxxxxxx/*",
                "arn:aws:s3:::codepipeline-ap-southeast-1-625xxxxxxx/octen_frontend_prod/SourceArti/*",
                "arn:aws:logs:ap-southeast-1:57313xxxxxxx:log-group:/aws/codebuild/MyApp",
                "arn:aws:logs:ap-southeast-1:57313xxxxxxx:log-group:/aws/codebuild/MyApp:*"
            ]
        },
        {
            "Sid": "VisualEditor1",
            "Effect": "Allow",
            "Action": [
                "s3:PutAccountPublicAccessBlock",
                "s3:GetAccountPublicAccessBlock",
                "s3:ListAllMyBuckets",
                "s3:*",
                "s3:ListJobs",
                "s3:CreateJob",
                "s3:HeadBucket"
            ],
            "Resource": "*"
        },
        {
            "Sid": "VisualEditor2",
            "Effect": "Allow",
            "Action": "logs:CreateLogGroup",
            "Resource": [
                "arn:aws:logs:ap-southeast-1:5731xxxxxxxx:log-group:/aws/codebuild/MyApp",
                "arn:aws:logs:ap-southeast-1:5731xxxxxxxx:log-group:/aws/codebuild/MyApp:*"
            ]
        }
    ]
}

【问题讨论】:

    标签: amazon-web-services amazon-s3 continuous-deployment aws-codepipeline aws-codebuild


    【解决方案1】:

    好的.. 所以 CodeBuild 只接受 zip 格式,而我提供的是 tar 工件。
    事实上,CodeBuild 详细信息页面下的 Phase Details 部分实际上提供了错误原因,即 CLIENT_ERROR: zip: not a valid zip file for primary source。我怎么会错过这让我想知道......

    【讨论】:

      猜你喜欢
      • 2022-10-05
      • 2022-09-28
      • 1970-01-01
      • 2021-02-03
      • 2022-01-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多