Search code examples
amazon-web-servicesaws-lambdaaws-step-functions

Is there a way to filter executions based on input?


I'm trying to search executions in a state machine by their input. I took a look at the List Executions doc, but as far as I can tell it seems you can only filter based on state (running, succeeded, failed, etc.). Is there a way to filter based only on input?

For example, below is what the input section in my console looks like. How can I find all executions where fooInput is equal to abc?

aws console


Solution

  • I'm trying to search executions in a state machine by their input.

    No, there are currently no APIs that natively support this. The only way would be to list all executions, describe the executions, and filter them yourself, and this is expensive.

    One way you could avoid describing the execution is by adding the value (or its hash) of the field (fooInput) in the executionId. This would directly let you search on the output you get from listExecutions. However, note that executionId has its size limits as well.