Search code examples
amazon-web-servicesamazon-s3yamlaws-cloudformationaws-glue

Error when creating GlueSecurityConfiguration using Cloudformation script


I am trying to create the glue security configuration using cloudformation script but I am getting the following error: Property validation failure: [Value of property {/EncryptionConfiguration/S3Encryptions} does not match type {Array}]

What is the right way to give the S3encryption?

AWSTemplateFormatVersion: 2010-09-09
Description: Script creates resources for GlueSecurityConfiguration
    
Resources:
  GlueSecurityConfiguration:
    Type: AWS::Glue::SecurityConfiguration
    Properties: 
      EncryptionConfiguration: 
        S3Encryptions:
            KmsKeyArn: !Ref KMSArn
            S3EncryptionMode: SSE-KMS
        JobBookmarksEncryption:
          KmsKeyArn: !Ref KMSArn
        CloudWatchEncryption:
          KmsKeyArn: !Ref KMSArn
      Name: !Sub '${SystemValue}-${SubSystemValue}'

Solution

  • I think it should be

    - KmsKeyArn: !Ref KMSArn
      S3EncryptionMode: SSE-KMS
    

    since S3Encryptions expects an array.