{"record":{"id":"4a5e466d63e71d18","repo":"heygen-com/hyperframes","slug":"rendertolambda-startexecution-returned-no-execut","errorCode":null,"errorMessage":"[renderToLambda] StartExecution returned no executionArn","messagePattern":"\\[renderToLambda\\] StartExecution returned no executionArn","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/aws-lambda/src/sdk/renderToLambda.ts","lineNumber":141,"sourceCode":"  // (typically from `config.variables` containing inlined media) surfaces\n  // as `States.DataLimitExceeded` 50 ms into the execution, far from the\n  // caller's stack frame. Measured AFTER `deploySite` so the synthesised\n  // `ProjectS3Uri` is counted (a few hundred bytes either way, but the\n  // check should be against the actual wire payload).\n  validateStepFunctionsInputSize(input);\n\n  const sfn = opts.sfn ?? new SFNClient({ region: opts.region });\n  const startedAt = new Date().toISOString();\n  const response = await sfn.send(\n    new StartExecutionCommand({\n      stateMachineArn: opts.stateMachineArn,\n      name: executionName,\n      input: JSON.stringify(input),\n    }),\n  );\n\n  if (!response.executionArn) {\n    throw new Error(\"[renderToLambda] StartExecution returned no executionArn\");\n  }\n\n  return {\n    renderId: executionName,\n    executionArn: response.executionArn,\n    bucketName: opts.bucketName,\n    stateMachineArn: opts.stateMachineArn,\n    outputS3Uri,\n    projectS3Uri: site.projectS3Uri,\n    startedAt,\n  };\n}\n","sourceCodeStart":123,"sourceCodeEnd":154,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/aws-lambda/src/sdk/renderToLambda.ts#L123-L154","documentation":"Thrown by renderToLambda after a successful StartExecutionCommand when the SDK response object has no executionArn field. Under normal operation the AWS Step Functions API always returns the execution ARN on a 200 response, so in production this indicates a transport/SDK anomaly or a non-conformant SFN-compatible service. The most common real-world trigger is a test stub or mock SFN client whose send() return value omits the field.","triggerScenarios":"A unit/integration test injects opts.sfn as a fake client whose send() resolves to {} or { $metadata: … } without executionArn. In production: an SDK version regression, a proxy that strips fields, or a Step Functions-compatible engine (LocalStack, a third-party runtime) that doesn't populate executionArn.","commonSituations":"Test mocks that return a partial StartExecution response; running against LocalStack with an older image; a custom SFN-compatible backend; an SDK middleware that accidentally drops the field.","solutions":["In tests, ensure the mock SFN client returns { executionArn: 'arn:…:execution:…' }.","Verify the @aws-sdk/client-sfn version matches the one the package was built against.","If using LocalStack, upgrade to an image that supports the executionArn response field.","Log the raw response object to confirm which field is missing."],"exampleFix":"// before (test mock)\nsfn.send = async () => ({ $metadata: { httpStatusCode: 200 } });\n\n// after\nsfn.send = async () => ({\n  executionArn: `arn:aws:states:us-east-1:000000000000:execution:sm:hf-render-test`,\n  startDate: new Date(),\n});","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"const hasExecutionArn = (r: unknown): r is { executionArn: string } =>\n  typeof (r as any)?.executionArn === 'string';","tryCatchPattern":"const response = await sfn.send(new StartExecutionCommand({ … }));\nif (!response.executionArn) {\n  throw new Error('StartExecution returned no executionArn; check SDK/SFN compatibility');\n}","preventionTips":["In tests, ensure the mock SFN client returns { executionArn: '…' }.","Pin the @aws-sdk/client-sfn version to the one the package targets.","If running against LocalStack or a SFN-compatible engine, verify it populates executionArn."],"tags":["step-functions","sdk","render","testing","aws-lambda"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}