Search code examples
amazon-web-servicesfilteraws-step-functions

In AWS step functions what is 'matches string' in the choice state?


In choice state you can set various filters. Among the filters you can set is 'matches string' which is represented like this: '~='.

You can also set is equal to string constant which is represented like this: '=='. This I understand.

What does 'matches string' filter mean in the choice state in step function?


Solution

  • It is for wildcard matching with *

    e.g. if the filter is foo*, it will match foobar, foobaz, etc.

    From the documentation:

    String comparison against patterns with one or more wildcards (“*”) can be performed with the StringMatches comparison operator. The wildcard character is escaped by using the standard \\ (Ex: “\\*”). No characters other than “*” have any special meaning during matching.