title: AWS Step function - choice step - TimestampEquals matching with multiple input variables
body: <p>I have been trying to create a step function with a choice step that acts as a rule engine. I would like to compare a date variable (from the stale input JSON) to another date variable that I generate with a lambda function.</p>
  <p><a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html" rel="nofollow noreferrer">AWS documentation</a> does not go into details about the Timestamp comparator functions, but I assumed that it can handle two input variables. Here is the relevant part of the code:</p>
  <pre><code>{
    &quot;Variable&quot;: &quot;$.staleInputVariable&quot;,
    &quot;TimestampEquals&quot;: &quot;$.generatedTimestampUsingLambda&quot;
  }
  </code></pre>
  <p>Here is the error that I am getting when trying to update(!!!) the stepFunction. I would like to highlight the fact that I don't even get to invoking the stepFunction as it fails while updating the function.</p>
  <pre><code>Resource handler returned message: &quot;Invalid State Machine Definition: 'SCHEMA_VALIDATION_FAILED: String does not match RFC3339 timestamp at ..... (Service: AWSStepFunctions; Status Code: 400; Error Code: InvalidDefinition; Request ID: 97df9775-7d2d-4dd2-929b-470c8s741eaf; Proxy: null)&quot; (RequestToken: 030aa97d-35a5-a6a5-0ac5-5698a8662bc2, HandlerErrorCode: InvalidRequest)
  </code></pre>
  <p>The stepfunction updates without the Timestamp matching, therefore, I suspect this bit of code.. Any guess?</p>
  <p>EDIT (08.Jun.2021):</p>
  <blockquote>
  <p>A comparison – Two fields that specify an input variable to compare,
  the type of comparison, and the value to compare the variable to.
  Choice Rules support comparison between two variables. Within a Choice
  Rule, the value of Variable can be compared with another value from
  the state input by appending Path to name of supported comparison
  operators.
  Source: <a href="https://docs.aws.amazon.com/step-functions/latest/dg/amazon-states-language-choice-state.html" rel="nofollow noreferrer">AWS docs</a></p>
  </blockquote>
  <p>It clearly states that two variables can be compared, but to no avail. Still trying :)</p>