You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 9, 2025. It is now read-only.
|`SQS_DISABLE_CLOUDWATCH_METRICS`|`0` (default) | Disables the CloudWatch Metrics for SQS when set to `1`|
338
338
|`SQS_CLOUDWATCH_METRICS_REPORT_INTERVAL`|`60` (default) | Configures the report interval (in seconds) for `Approximate*` metrics that are sent to CloudWatch periodically. Sending will be disabled if `SQS_DISABLE_CLOUDWATCH_METRICS=1`|
339
339
340
+
### Step Functions
341
+
342
+
| Variable | Example Values | Description |
343
+
| - | - | - |
344
+
|`SFN_MOCK_CONFIG`|`/tmp/MockConfigFile.json`| Specifies the file path to the mock configuration file that defines mock service integrations for Step Functions. |
Copy file name to clipboardExpand all lines: content/en/user-guide/aws/stepfunctions/index.md
+45-43Lines changed: 45 additions & 43 deletions
Original file line number
Diff line number
Diff line change
@@ -137,7 +137,7 @@ LocalStack's Step Functions emulation supports the following AWS services:
137
137
138
138
Mocked service integrations allow you to test AWS Step Functions without calling LocalStack's emulated AWS services.
139
139
Instead, Task states return predefined outputs from a mock configuration file.
140
-
They key components are:
140
+
The key components are:
141
141
142
142
-**Mocked service integrations**: Task states that return predefined responses instead of invoking local AWS services.
143
143
-**Mocked responses**: Static payloads associated with mocked Task states.
@@ -148,66 +148,71 @@ During execution, each Task state defined in the mock file returns its correspon
148
148
States not listed continue to invoke their real emulated services, allowing a mix of mocked and live interactions.
149
149
150
150
You can provide one or more mocked payloads per Task state.
151
-
Supported patterns include `.sync`, `.sync2`, and `.waitForTaskToken`.
151
+
The Supported patterns include `.sync`, `.sync2`, and `.waitForTaskToken`.
152
152
Both success and failure scenarios can be simulated.
153
153
154
+
### Compatibility with AWS Step Functions Local
155
+
156
+
LocalStack can also serve as a drop-in replacement for [AWS Step Functions Local testing with mocked service integrations](https://docs.aws.amazon.com/step-functions/latest/dg/sfn-local-test-sm-exec.html).
157
+
It supports test cases with mocked Task states and maintains compatibility with existing Step Functions Local configurations.
158
+
This functionality is extended in LocalStack by providing access to the latest Step Functions features such as [JSONata and Variables](https://blog.localstack.cloud/aws-step-functions-made-easy/), as well as the ability to enable both mocked and emulated service interactions emulated by LocalStack.
159
+
154
160
{{< callout >}}
155
161
LocalStack does not validate response formats.
156
-
Ensure the payload structure matches what the real service expects.
162
+
Ensure the payload structure in the mocked responses matches what the real service expects.
157
163
{{< /callout >}}
158
164
159
165
### Identify a State Machine for Mocked Integrations
160
166
161
167
Mocked service integrations apply to specific state machine definitions.
162
168
The first step is to select the state machine where mocked responses will be used.
163
169
164
-
In this example, the `LambdaSQSIntegration` state machine will be used with the following definition:
170
+
In this example, the state machine with the name `LambdaSQSIntegration` state machine will be used with the following definition:
165
171
166
172
```json
167
173
{
168
-
"Comment":"This state machine is called: LambdaSQSIntegration",
After the state machine is created and named correctly, test cases from the mock configuration file can be run using the [`StartExecution`](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html)or [StartSyncExecution](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartSyncExecution.html) APIs.
418
+
After the state machine is created and named correctly, test cases from the mock configuration file can be run using the [`StartExecution`](https://docs.aws.amazon.com/step-functions/latest/apireference/API_StartExecution.html)API.
417
419
418
420
To execute a test case, append the test case name to the state machine ARN using `#`.
419
421
This tells LocalStack to apply the mocked responses from the configuration file.
0 commit comments