Skip to content

Commit c87f06d

Browse files
authored
docs: fix durable invoke comment (#380)
Makes it clear that the passed function ARN/Id must be qualified using a version or alias *Issue #, if available:* *Description of changes:* By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. Signed-off-by: Michael Gasch <15986659+embano1@users.noreply.github.com>
1 parent ed421b1 commit c87f06d

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

packages/aws-durable-execution-sdk-js/src/types/durable-context.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,18 @@ export interface DurableContext<TLogger extends DurableLogger = DurableLogger> {
138138
): DurablePromise<TOutput>;
139139

140140
/**
141-
* Invokes another durable function with the specified input
141+
* Invokes another durable or non-durable function with the specified input
142142
* @param name - Step name for tracking and debugging
143-
* @param funcId - Function ID or ARN of the durable function to invoke
143+
* @param funcId - Function ID or ARN. Alias/version qualifier required for durable functions only.
144144
* @param input - Input data to pass to the invoked function
145145
* @param config - Optional configuration for serialization
146146
* @throws \{InvokeError\} When the invoked function fails or times out
147147
* @example
148148
* ```typescript
149+
* // Invoking a durable function by arn using version qualifier
149150
* const result = await context.invoke(
150151
* "process-payment",
151-
* "arn:aws:lambda:us-east-1:123456789012:function:payment-processor",
152+
* "arn:aws:lambda:us-east-1:123456789012:function:payment-processor:1",
152153
* { amount: 100, currency: "USD" }
153154
* );
154155
* ```
@@ -161,15 +162,16 @@ export interface DurableContext<TLogger extends DurableLogger = DurableLogger> {
161162
): DurablePromise<TOutput>;
162163

163164
/**
164-
* Invokes another durable function with the specified input
165-
* @param funcId - Function ID or ARN of the durable function to invoke
165+
* Invokes another durable or non-durable function with the specified input
166+
* @param funcId - Function ID or ARN. Alias/version qualifier required for durable functions only.
166167
* @param input - Input data to pass to the invoked function
167168
* @param config - Optional configuration for serialization
168169
* @throws \{InvokeError\} When the invoked function fails or times out
169170
* @example
170171
* ```typescript
172+
* // Invoking a durable function by name using alias qualifier
171173
* const result = await context.invoke(
172-
* "payment-processor-function",
174+
* "payment-processor-function:myalias",
173175
* { amount: 100, currency: "USD" }
174176
* );
175177
* ```

0 commit comments

Comments
 (0)