@@ -32,8 +32,9 @@ lambda.invoke('some-lambda', { some: 'event' }, callback);
32
32
to 5 seconds.
33
33
- ` max_idle ` : The idle timeout to use in milliseconds. If a function is
34
34
not invoked for this time, the process gets destroyed. Defaults to 1 hour.
35
- - ` lambda.invoke(lambda_name, event[, options], callback) ` : Invokes the named
36
- Lambda ` handle ` function. These options are supported:
35
+ - ` lambda.invoke(lambda_name, event[, options][, callback]) ` : Invokes the named
36
+ Lambda ` handle ` function. If no callback is given, a promise is returned.
37
+ These options are supported:
37
38
- ` awsRequestId ` : The AWS request ID to use in the Lambda ` context ` .
38
39
If a context is given, but one of the above properties is missing, they are
39
40
added to the context.
@@ -50,7 +51,7 @@ lambda.invoke('some-lambda', { some: 'event' }, callback);
50
51
51
52
## Lambda context
52
53
53
- Lambda function are invoked with ` (event, context, callback) ` where the
54
+ Lambda function are invoked with ` (event, context[ , callback] ) ` where the
54
55
` context ` has this interface:
55
56
56
57
- ` functionName ` : The name of the Lambda function.
@@ -63,6 +64,8 @@ Lambda function are invoked with `(event, context, callback)` where the
63
64
- ` getRemainingTimeInMillis() ` : Returns the remaining time until the Lambda
64
65
function times out.
65
66
67
+ If ` callback ` is not defined (the lambda handler function has an arity < 3), the function is expected to return a promise.
68
+
66
69
## Debugging Lambda functions
67
70
68
71
If the environment variable ` STUDIO_LAMBDA_INSPECT ` is set to the name of a
0 commit comments