【问题标题】:Cloudformation fails with 'failed validation constraint for keyword [pattern]'Cloudformation 因“关键字 [pattern] 的验证约束失败”而失败
【发布时间】:2022-02-08 15:30:47
【问题描述】:

我正在尝试使用 AWS CloudFormation 创建一个工作流对象。此工作流程将与 AWS 文件传输系列一起使用,以便在上传文件时将文件复制到 S3。

AWSTemplateFormatVersion: "2010-09-09"

Resources:
  SftpToS3Workflow:
    Type: AWS::Transfer::Workflow
    Properties: 
      Description: 'Workflow used by AWS File Transfer Family. Copies the files to S3'
      Steps: 
        - Type: COPY
          CopyStepDetails:
            Name: copt-to-s3-wf-step
            DestinationFileLocation:
              S3FileLocation:
                Bucket: !ImportValue GenesysS3BucketName
                Key: "genesys/"
            OverwriteExisting: 'TRUE'
        
Outputs:
    SftpToS3WorkflowId:
      Description: 'Id of the Workflow'
      Value: !GetAtt SftpToS3Workflow.WorkflowId
      Export:
        Name: SftpToS3WorkflowId

很遗憾,此脚本失败并出现以下错误。该错误并未说明哪些属性未通过验证。有人可以帮忙吗?我在 GitHub 上什至找不到一个示例。

资源 SftpToS3Workflow 的属性验证失败,消息为:#/描述:关键字 [模式] 的验证约束失败

我已使用此 CloudFormation 架构来编写代码:

https://github.com/APIs-guru/openapi-directory/blob/0380216a44c364b4517b31a93295089a6f4f23b9/APIs/amazonaws.com/transfer/2018-11-05/openapi.yaml

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation


    【解决方案1】:

    Description 只能是

    ^[\w- ]*$
    

    应该是这样的:

    Description: 'Workflow used by AWS File Transfer Family - Copies the files to S3'
    

    【讨论】:

    • 你知道自己是个天才吗?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-05-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多