Search code examples
amazon-web-servicesamazon-s3yamlamazon-cloudfrontaws-sam

aws sam bucket deploy failed due to Encountered unsupported boolean value true


I tried to deploy a S3:Bucket with sam. But when i run sam deploy, it failes with the error message "Encountered unsupported boolean value true"

Any idea why ?

Template

TestFileBucket:
Type: AWS::S3::Bucket
Properties:
  PublicAccessBlockConfiguration:
    BlockPublicAcls : true
    BlockPublicPolicy : true
    IgnorePublicAcls : true
    RestrictPublicBuckets : true
  CorsConfiguration:
    CorsRules:
      - AllowedHeaders:
          - "*"
        AllowedMethods:
          - GET
          - PUT
        AllowedOrigins:
          - "*"
        Id: devCorsRule
        MaxAge: 3600
  BucketName: !Sub ${Environment}-testbucket

Solution

  • See the comment from Sandor Bankos for the answer