title: How to put boolean value on CloudWatchEvent pattern in SAM template
body: <p>I'm using SAM and my lambda is triggered by CloudWatchEvents. I'm trying to match events that have "campaign" in their details as in <a href="https://docs.aws.amazon.com/eventbridge/latest/userguide/content-filtering-with-event-patterns.html#filtering-exists-matching" rel="nofollow noreferrer">this example of the documentation</a>. This is the code of the lambda Events property in my sam template:</p>
  
  <pre><code>            feedPost:
                  Type: CloudWatchEvent
                  Properties:
                      EventBusName: my_bus
                      Pattern:
                          source:
                              - mySource
                          detail:
                              campaign:
                                  - exists: true
  </code></pre>
  
  <p>The problem is that when on deployment, the following error arises:</p>
  
  <blockquote>
    <p>Event pattern is not valid. Reason: exists match pattern must be
    either true or false. at [Source: (String)"{
    "source":["mySource"],"detail":{"campaign":[{"exists":"true"}]}}";</p>
  </blockquote>
  
  <p>Apparently it is transforming true into an string. How can I make this work?</p>