aws_lambda_invoke
Invoke a Lambda function synchronously and get its response payload plus the decoded tail of its execution log in one call, removing the need to locate and tail logs separately.
Instructions
Invoke a Lambda function synchronously (RequestResponse) and return its response payload plus the DECODED tail of its execution log in one call. Use this instead of aws_call for Lambda invokes: aws lambda invoke needs a positional output file and rejects --cli-input-json, so aws_call structurally cannot reach it. The returned logTail is the last ~4 KB of the function's own log output, already base64-decoded, which removes the usual invoke -> find the log group -> tail it -> hope the window caught it loop. IMPORTANT: a non-empty functionError means the function's HANDLER threw; the invocation itself still succeeded, so ok is true and the thrown error is in payload.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | Override session region for this call. | |
| payload | No | The event to pass to the function. Any JSON value (usually an object); it is JSON-encoded and sent as the request body. Omit for a function that takes no input — this sends no payload at all rather than an empty object. | |
| profile | No | Override session profile for this call. | |
| qualifier | No | Version number or alias to invoke, e.g. '3' or 'PROD'. Defaults to $LATEST. | |
| timeoutMs | No | Timeout in milliseconds. Default 60000 (60s). Raise it for a function whose own timeout is longer — a Lambda may run up to 15 minutes. | |
| functionName | Yes | Function name, name:alias, partial ARN ('123456789012:function:my-fn'), or full ARN. E.g. 'my-function', 'my-function:PROD'. | |
| invocationType | No | Only 'RequestResponse' (synchronous) is supported. Async 'Event' and permission-check 'DryRun' are deliberately not implemented — 'Event' returns no payload or logs and needs its own result shape; for 'DryRun', use aws_iam_simulate instead. |