{"record":{"id":"25caddfd3c2583c4","repo":"heygen-com/hyperframes","slug":"validateconfig-config-step-functions-execution-25cadd","errorCode":null,"errorMessage":"[validateConfig] config: Step Functions execution input is ${byteLength} bytes, which exceeds the ${MAX_STEP_FUNCTIONS_INPUT_BYTES}-byte (256 KiB) limit for Standard workflows. Variables are for typed data (strings, numbers, structured records); media assets (images, audio, video) should be passed as URL references the composition resolves at render time, not inlined as base64. See ${LARGE_VARIABLES_DOCS_URL} for the URL-your-assets convention.","messagePattern":"\\[validateConfig\\] config: Step Functions execution input is (.+?) bytes, which exceeds the (.+?)-byte \\(256 KiB\\) limit for Standard workflows\\. Variables are for typed data \\(strings, numbers, structured records\\); media assets \\(images, audio, video\\) should be passed as URL references the composition resolves at render time, not inlined as base64\\. See (.+?) for the URL-your-assets convention\\.","errorType":"validation","errorClass":"InvalidConfigError","httpStatus":null,"severity":"error","filePath":"packages/aws-lambda/src/sdk/validateConfig.ts","lineNumber":69,"sourceCode":"  let serialized: string | undefined;\n  try {\n    serialized = JSON.stringify(input);\n  } catch (err) {\n    throw new InvalidConfigError(\n      \"config\",\n      `Step Functions execution input is not JSON-serializable: ${err instanceof Error ? err.message : String(err)}`,\n    );\n  }\n  if (serialized === undefined) {\n    throw new InvalidConfigError(\n      \"config\",\n      \"Step Functions execution input is not JSON-serializable (JSON.stringify returned undefined). \" +\n        \"Check that all fields, including config.variables, are plain JSON values.\",\n    );\n  }\n  const byteLength = Buffer.byteLength(serialized, \"utf8\");\n  if (byteLength > MAX_STEP_FUNCTIONS_INPUT_BYTES) {\n    throw new InvalidConfigError(\n      \"config\",\n      `Step Functions execution input is ${byteLength} bytes, which exceeds the ` +\n        `${MAX_STEP_FUNCTIONS_INPUT_BYTES}-byte (256 KiB) limit for Standard workflows. ` +\n        `Variables are for typed data (strings, numbers, structured records); media assets ` +\n        `(images, audio, video) should be passed as URL references the composition resolves ` +\n        `at render time, not inlined as base64. See ${LARGE_VARIABLES_DOCS_URL} for the ` +\n        `URL-your-assets convention.`,\n    );\n  }\n}\n","sourceCodeStart":51,"sourceCodeEnd":80,"githubUrl":"https://github.com/heygen-com/hyperframes/blob/c2996c8626135db5253519359d8a063d3bafad8d/packages/aws-lambda/src/sdk/validateConfig.ts#L51-L80","documentation":"Thrown as an InvalidConfigError by validateStepFunctionsInputSize when the UTF-8 byte length of the serialized Step Functions execution input exceeds 256 KiB (MAX_STEP_FUNCTIONS_INPUT_BYTES = 262144). Step Functions Standard workflows hard-cap execution input at 256 KiB; without this check the oversized payload would start the execution and fail ~50ms in with States.DataLimitExceeded, far from the caller's stack. The message names the actual byte count, the cap, and points to the docs convention of passing media as URL references instead of inlined base64.","triggerScenarios":"config.variables contains one or more base64-encoded media assets (images, short audio clips) inlined directly; a very large JSON structure (deeply nested data); many large string values. The whole input (including ProjectS3Uri, OutputS3Uri, Config) is measured.","commonSituations":"Inlining a logo PNG as base64 in variables; embedding a subtitle/caption blob; a data-viz payload with thousands of points; passing an entire HTML composition string inline instead of via the project tarball.","solutions":["Move inlined media (images/audio/video) out of variables and pass them as URLs the composition resolves at render time.","Upload large data blobs to S3 and pass the object URL in variables instead of the bytes.","Trim or paginate large data structures; pre-aggregate on the client.","Run Buffer.byteLength(JSON.stringify(input), 'utf8') locally to see how close you are to 262144."],"exampleFix":"// before\nconfig.variables = { logo: 'data:image/png;base64,iVBOR...' }; // ~200 KB\n\n// after\nconfig.variables = { logoUrl: 'https://cdn.example.com/logo.png' };\n// composition resolves logoUrl at render time","handlingStrategy":"validation","validationCode":"const MAX = 256 * 1024;\nfunction assertUnderSfnLimit(input: unknown): void {\n  const bytes = Buffer.byteLength(JSON.stringify(input), 'utf8');\n  if (bytes > MAX) throw new Error(`input ${bytes}B exceeds ${MAX}B; inline media as URLs`);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Pass media (images/audio/video) as URLs, never base64-inlined in variables.","Pre-aggregate large datasets before sending; ship big blobs via S3 URLs.","Measure Buffer.byteLength(JSON.stringify(input),'utf8') locally during development."],"tags":["validation","step-functions","config","size-limit","aws-lambda"],"backgroundTag":null,"analyzedSha":"c2996c8626135db5253519359d8a063d3bafad8d","analyzedAt":"2026-08-12T22:18:56.877Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}