Cloudformation fails with 'failed validation constraint for keyword [pattern]'

Viewed 292

I am trying to create a Workflow object using AWS CloudFormation. This workflow will be used with AWS File Transfer Family so that files get copied to S3 upon uploading.

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

Unfortunately, this script fails with the below error. The error does not say what property is failing validation. Can someone help, please? I could not find even one single example on GitHub.

Properties validation failed for resource SftpToS3Workflow with message: #/Description: failed validation constraint for keyword [pattern]

I have used this CloudFormation schema to write the code:

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

1 Answers

The Description can only be

^[\w- ]*$

So it should be:

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