Input and Output Processing in Step Functions - Amazon Step Functions
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Input and Output Processing in Step Functions

A Step Functions execution receives a JSON text as input and passes that input to the first state in the workflow. Individual states receive JSON as input and usually pass JSON as output to the next state. Understanding how this information flows from state to state, and learning how to filter and manipulate this data, is key to effectively designing and implementing workflows in Amazon Step Functions.

In the Amazon States Language, these fields filter and control the flow of JSON from state to state:

  • InputPath

  • Parameters

  • ResultSelector

  • ResultPath

  • OutputPath

The following diagram shows how JSON information moves through a task state. InputPath selects which parts of the JSON input to pass to the task of the Task state (for example, an Amazon Lambda function). ResultPath then selects what combination of the state input and the task result to pass to the output. OutputPath can filter the JSON output to further limit the information that's passed to the output.


      Input and output processing

InputPath, Parameters, ResultSelector, ResultPath, and OutputPath each manipulate JSON as it moves through each state in your workflow.

Each can use paths to select portions of the JSON from the input or the result. A path is a string, beginning with $, that identifies nodes within JSON text. Step Functions paths use JsonPath syntax.

Tip

Use the data flow simulator in the Step Functions console to test JSON path syntax, to better understand how data is manipulated within a state, and to see how data is passed between states.

Tip

To deploy an example of a workflow that includes input and output processing to your Amazon Web Services account, see Module 6 - Input and Output Processing of The Amazon Step Functions Workshop.