Skip to content

Commit 2ea4d19

Browse files
committed
docs: clarify invoke supports standard Lambda functions
1 parent 0097f4a commit 2ea4d19

3 files changed

Lines changed: 12 additions & 6 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Your durable function extends `DurableHandler<I, O>` and implements `handleReque
3030
- `ctx.wait()` – Suspend execution without compute charges
3131
- `ctx.createCallback()` – Wait for external events (approvals, webhooks)
3232
- `ctx.waitForCallback()` – Simplify callback handling by combining callback creation and submission in one operation
33-
- `ctx.invoke()` – Invoke another Lambda function and wait for the result
33+
- `ctx.invoke()` – Invoke another Lambda function, durable or standard, and wait for the result
3434
- `ctx.runInChildContext()` – Run an isolated child context with its own checkpoint log
3535
- `ctx.map()` – Apply a function to each item in a collection concurrently
3636
- `ctx.parallel()` - Run multiple operations concurrently with optional concurrency control
@@ -96,7 +96,7 @@ See [Deploy Lambda durable functions with Infrastructure as Code](https://docs.a
9696
- [<u>Steps</u>](docs/core/steps.md) – Execute code with automatic checkpointing and retry support
9797
- [<u>Wait</u>](docs/core/wait.md) - Pause execution without blocking Lambda resources
9898
- [<u>Callbacks</u>](docs/core/callbacks.md) - Wait for external systems to respond
99-
- [<u>Invoke</u>](docs/core/invoke.md) - Call other durable functions
99+
- [<u>Invoke</u>](docs/core/invoke.md) - Call durable functions or standard Lambda functions
100100
- [<u>Child Contexts</u>](docs/core/child-contexts.md) - Organize complex workflows into isolated units
101101
- [<u>Map</u>](docs/core/map.md) - Apply a function across a collection concurrently
102102
- [<u>Parallel</u>](docs/core/parallel.md) - Run multiple operations concurrently with optional concurrency control

docs/core/invoke.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
## invoke() - Invoke another Lambda function
1+
## invoke() - Invoke Other Lambda Functions Durably
2+
3+
The invoke operation calls another Lambda function and waits for its result. It supports both durable functions and standard on-demand Lambda functions.
4+
5+
When you call `ctx.invoke()` or `ctx.invokeAsync()`, the SDK checkpoints the start of the operation and the durable functions backend invokes the target Lambda function. On replay, the SDK returns the checkpointed result without invoking the target again.
6+
7+
`functionName` can be a Lambda function name or ARN. Durable function targets require an alias or version qualifier; standard on-demand Lambda functions do not require a qualifier.
28

39

410
```java
@@ -14,4 +20,4 @@ var result = ctx.invoke("invoke-function",
1420
.build()
1521
);
1622

17-
```
23+
```

examples/src/main/java/software/amazon/lambda/durable/examples/invoke/SimpleInvokeExample.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@
1010
/**
1111
* Simple example demonstrating basic invoke execution with the Durable Execution SDK.
1212
*
13-
* <p>This handler invokes another durable lambda function simple-step-example
13+
* <p>This handler invokes another Lambda function, such as simple-step-example.
1414
*/
1515
public class SimpleInvokeExample extends DurableHandler<GreetingRequest, String> {
1616

1717
@Override
1818
public String handleRequest(GreetingRequest input, DurableContext context) {
19-
// invoke `simple-step-example` function
19+
// Invoke the `simple-step-example` function.
2020
var future = context.invokeAsync(
2121
"call-greeting1",
2222
"simple-step-example" + input.getName() + ":$LATEST",

0 commit comments

Comments
 (0)