CodePipeline - 遇到不受支持的 属性 配置

CodePipeline - Encountered unsupported property configuration

通过 SLS 部署此 CloudFormation 模板时,我收到一条神秘的错误消息,没有来自 CloudFormation Events 的更多信息:

  FrontendPipeline:
    Type: 'AWS::CodePipeline::Pipeline'
    Properties:
      Name: FrontendPipeline-${opt:stage, 'dev'}
      RoleArn: !GetAtt FrontendCodePipeLineRole.Arn
      ArtifactStore:
        Location: !Ref FrontendPipelineBucket
        Type: S3
      Stages:
        - Name: FrontendSource
          Actions:
            - Name: FrontendSourceAction
              ActionTypeId:
                Category: Source
                Owner: AWS
                Provider: CodeCommit
                Version: 1
              Configuration:
                BranchName: "dev"
                OutputArtifactFormat: CODEBUILD_CLONE_REF
                RepositoryName: !GetAtt RepoFrontend.Name
              OutputArtifacts:
                - name: Frontend-${opt:stage, 'dev'}
        - Name: Build
          Actions:
            - Name: FrontendBuildAction
              ActionTypeId:
                Category: Build
                Owner: AWS
                Provider: CodeBuild
                Version: 1
              InputArtifacts:
                - Name: FrontendSource
              OutputArtifacts:
                - Name: FrontendBuild
              Configuration:
                ProjectName: !Ref FrontendCodeBuild

错误是:

Serverless Error ----------------------------------------

    An error occurred: CodePipeline - Encountered unsupported property configuration.

哪个不受支持属性?

我发现您的模板存在一些潜在问题:

  • 您在第一阶段使用 configuration 而不是像在第二阶段那样使用 Configuration
  • 您在第一阶段使用 outputArtifacts 而不是像在第二阶段那样使用 OutputArtifacts