> For the complete documentation index, see [llms.txt](https://awsnotes.dendron.so/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://awsnotes.dendron.so/application-integration/aws-step-functions/topics/how-step-functions-works.md).

# How Step Functions works

{% hint style="info" %}
This page was generated from content adapted from the [AWS Developer Guide](https://github.com/awsdocs/aws-step-functions-developer-guide.git)
{% endhint %}

## Standard vs. Express Workflows

* **Note**\
  If you define your state machines outside the Step Functions' console, such as in an editor of your choice, you must save your state machine definitions with the extension *.asl.json*.

## States

* **Note**\
  If you define your state machines outside the Step Functions' console, such as in an editor of your choice, you must save your state machine definitions with the extension *.asl.json*.

## State Machine Data

* **Note**\
  Numbers in JSON text format conform to JavaScript semantics. These numbers typically correspond to double-precision [IEEE-854](https://standards.ieee.org/findstds/standard/854-1987.html) values. The following is valid JSON text: standalone, quote-delimited strings; objects; arrays; numbers; Boolean values; and `null`. The output of a state becomes the input into the next state. However, you can restrict states to working on a subset of the input data by using [Input and Output Processing](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_step_functions/concepts-input-output-filtering.md).

## Input and Output Processing

* **Tip**\
  Use the [data flow simulator in the Step Functions console](https://console.aws.amazon.com/states/home?region=us-east-1#/simulator) to test JSON path syntax, to better understand how data is manipulated within a state, and to see how data is passed between states.

## Error handling

* **Note**\
  Unhandled errors in Lambda are reported as `Lambda.Unknown` in the error output. These include out-of-memory errors and function timeouts. You can match on `Lambda.Unknown`, `States.ALL`, or `States.TaskFailed` to handle these errors. When Lambda hits the maximum number of invocations, the error is `Lambda.TooManyRequestsException`. For more information about Lambda function errors, see [Error handling and automatic retries](https://docs.aws.amazon.com/lambda/latest/dg/invocation-retries.html) in the *AWS Lambda Developer Guide*.
* **Note**\
  Retries are treated as state transitions. For information about how state transitions affect billing, see [Step Functions Pricing](https://aws.amazon.com/step-functions/pricing/).
* **Note**\
  Each catcher can specify multiple errors to handle.
* **Note**\
  If you don't specify the `ResultPath` field, it defaults to `$`, which selects and overwrites the entire input.
* **Note**\
  When you create this Lambda function in the Lambda console, remember to change the **Timeout** value in the **Advanced settings** section from 3 seconds (default) to 11 seconds.
* **Note**\
  As a best practice, tasks that reference a Lambda function should handle Lambda service exceptions. For more information, see [Handle Lambda service exceptions](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_step_functions/bp-lambda-serviceexception.md).
* **Note**\
  You can preserve the state input and the error by using `ResultPath`. See [Use ResultPath to Include Both Error and Input in a `Catch`](https://github.com/kevinslin/aws-reference-notes/blob/main/services/aws_step_functions/input-output-resultpath.md#input-output-resultpath-catch).

## Tagging in Step Functions

* **Note**\
  To manage tags for activites, see [Manage Tags with Step Functions API Actions](#tagging-api).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://awsnotes.dendron.so/application-integration/aws-step-functions/topics/how-step-functions-works.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
