'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 1:[1]

See the comment from Sandor Bankos for the answer

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Donatic