title: Input Transformer: handle special characters in AWS Event Bridge
body: <p>I am having a hard time understanding why my input transformation is not working in Event Bridge.</p>
  <p>The following is the default input to a step function, which will intentionally cause my state machine to fail:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;Comment&quot;: &quot;Insert your JSON here&quot;
  }
  </code></pre>
  <p>I have configured a rule in EventBridge to notify the failure using the following Input Transformer:</p>
  <pre class="lang-json prettyprint-override"><code>{
      &quot;executionArn&quot;: &quot;$.detail.executionArn&quot;,
      &quot;inputs&quot;: &quot;$.detail.input&quot;,
      &quot;startDate&quot;: &quot;$.detail.startDate&quot;,
      &quot;status&quot;: &quot;$.detail.status&quot;
  }
  </code></pre>
  <p>It uses the above input in this template:</p>
  <pre class="lang-json prettyprint-override"><code>&quot;Flow Execution Failure! More information: &lt;executionArn&gt; Status: &lt;status&gt; Started On: &lt;startDate&gt; Flow Input: &lt;inputs&gt;&quot;
  </code></pre>
  <p><strong>The problem is</strong> no matter however I try to include <code>&lt;inputs&gt;</code>, it fails. I believe it is because the event will contain the following newline characters <code>\n</code>:</p>
  <pre class="lang-json prettyprint-override"><code>{
      ...
      &quot;detail&quot;: {
          &quot;status&quot;: &quot;FAILED&quot;,
          &quot;input&quot;: &quot;{\n    \&quot;Comment\&quot;: \&quot;Insert your JSON here\&quot;\n}&quot;
      }
  }
  </code></pre>
  <p><strong>I have tried</strong> escaping <code>&lt;input&gt;</code> in the following manners, none of which worked so far:</p>
  <ul>
  <li><code>Flow Input: \&quot;&lt;inputs&gt;\&quot;</code></li>
  <li><code>Flow Input: `&lt;inputs&gt;` </code></li>
  <li><code>Flow Input: \&quot;\`&lt;inputs&gt;\`\&quot;</code></li>
  </ul>