{"record":{"id":"ce42bf05f57efe90","repo":"remotion-dev/remotion","slug":"lambda-function-returned-no-payload-status-res","errorCode":null,"errorMessage":"Lambda function returned no payload (status ${res.StatusCode})","messagePattern":"Lambda function returned no payload \\(status (.+?)\\)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda-client/src/call-lambda-sync.ts","lineNumber":43,"sourceCode":"\t\tregion as AwsRegion,\n\t\ttimeoutInTest,\n\t\tnull,\n\t).send(\n\t\tnew InvokeCommand({\n\t\t\tFunctionName: functionName,\n\t\t\tPayload,\n\t\t\tInvocationType: 'RequestResponse',\n\t\t}),\n\t);\n\n\tif (res.FunctionError) {\n\t\tthrow new Error(\n\t\t\t`Lambda function returned error: ${res.FunctionError} ${res.LogResult}`,\n\t\t);\n\t}\n\n\tif (!res.Payload) {\n\t\tthrow new Error(\n\t\t\t`Lambda function returned no payload (status ${res.StatusCode})`,\n\t\t);\n\t}\n\n\tconst decoded = new TextDecoder('utf-8').decode(res.Payload);\n\n\ttry {\n\t\treturn JSON.parse(decoded) as OrError<ServerlessReturnValues<Provider>[T]>;\n\t} catch {\n\t\tthrow new Error(`Invalid JSON: ${JSON.stringify(decoded)}`);\n\t}\n};\n\nexport const callFunctionSyncImplementation = async <\n\tProvider extends CloudProvider,\n\tT extends ServerlessRoutines,\n>(\n\toptions: CallFunctionOptions<T, Provider>,","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda-client/src/call-lambda-sync.ts#L25-L61","documentation":"Thrown when a synchronous Invoke returns with no FunctionError but res.Payload is empty. The StatusCode is included. This is an abnormal Lambda service response — normally a sync RequestResponse invocation always carries a payload.","triggerScenarios":"Sync Lambda invocation returning StatusCode without a body. Rare; can indicate an AWS-side issue, an SDK/transport problem, or an intermediary stripping the response.","commonSituations":"Transient AWS service incidents, outdated @aws-sdk/client-lambda, a proxy/gateway rewriting the response, unusual account-level throttling.","solutions":["Retry the operation (transient)","Update @aws-sdk/client-lambda and @remotion/lambda-client to the latest version","Use the StatusCode in the message to narrow the cause (e.g. 5xx vs 2xx)","Report to Remotion with the StatusCode if it persists"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n  await callSync(...);\n} catch (err) {\n  if (/returned no payload \\(status/.test((err as Error).message)) {\n    // transient; retry with backoff\n  }\n  throw err;\n}","preventionTips":["Keep @aws-sdk/client-lambda and @remotion/lambda-client up to date","Retry transient empty-payload responses before alerting","Capture StatusCode for diagnosis when reporting"],"tags":["aws","lambda","sdk","transient"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}