Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions docs/cli-reference/invoke.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,16 @@ the specified/deployed function.
}
```

#### Function invocation with durable execution name

```bash
serverless invoke --function functionName --durable-execution-name order-12345
```

This example invokes a durable function with a unique execution name. If you invoke the same function with the same execution name again, Lambda returns the cached result from the previous execution instead of re-executing the function. This enables idempotent invocations for reliable workflow orchestration.

**Note:** Durable execution names must be 1-64 characters and contain only alphanumeric characters, hyphens, or underscores. See the [Functions guide](../guides/functions.md#aws-lambda-durable-functions) for more information on configuring durable functions.

### Local function invocation with custom context

```bash
Expand All @@ -125,16 +135,6 @@ serverless invoke local --function functionName \

This example will pass the json context in the `lib/context.json` file (relative to the root of the service) while invoking the specified/deployed function.

### Function invocation with durable execution name

```bash
serverless invoke --function functionName --contextPath lib/context.json --durable-execution-name order-12345
```

This example invokes a durable function with a unique execution name. If you invoke the same function with the same execution name again, Lambda returns the cached result from the previous execution instead of re-executing the function. This enables idempotent invocations for reliable workflow orchestration.

**Note:** Durable execution names must be 1-64 characters and contain only alphanumeric characters, hyphens, or underscores. See the [Functions guide](../guides/functions.md#aws-lambda-durable-functions) for more information on configuring durable functions.

### Limitations

Currently, `invoke local` only supports the Node.js, Python, Java and Ruby runtimes.
Expand Down