{"record":{"id":"b5547fb41fc01872","repo":"remotion-dev/remotion","slug":"parameter-timeoutinseconds-must-be-an-integer-bu","errorCode":null,"errorMessage":"parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}","messagePattern":"parameter 'timeoutInSeconds' must be an integer but got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/shared/validate-timeout.ts","lineNumber":27,"sourceCode":"\n\tif (Number.isNaN(timeoutInSeconds)) {\n\t\tthrow new TypeError(`parameter 'timeoutInSeconds' must not be NaN, but is`);\n\t}\n\n\tif (!Number.isFinite(timeoutInSeconds)) {\n\t\tthrow new TypeError(\n\t\t\t`parameter 'timeoutInSeconds' must be finite, but is ${timeoutInSeconds}`,\n\t\t);\n\t}\n\n\tif (timeoutInSeconds < MIN_TIMEOUT || timeoutInSeconds > MAX_TIMEOUT) {\n\t\tthrow new TypeError(\n\t\t\t`parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT} and ${MAX_TIMEOUT}, but got ${timeoutInSeconds}`,\n\t\t);\n\t}\n\n\tif (timeoutInSeconds % 1 !== 0) {\n\t\tthrow new TypeError(\n\t\t\t`parameter 'timeoutInSeconds' must be an integer but got ${timeoutInSeconds}`,\n\t\t);\n\t}\n};\n","sourceCodeStart":9,"sourceCodeEnd":32,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/shared/validate-timeout.ts#L9-L32","documentation":"Thrown by validateTimeout() in @remotion/lambda when timeoutInSeconds is a finite number inside the valid range but not an integer (timeoutInSeconds % 1 !== 0). AWS Lambda expects the timeout as whole seconds.","triggerScenarios":"Passing a fractional second value like 120.5 or 90.25 to deployFunction().","commonSituations":"Computing timeout as a fraction (e.g. estimatedSeconds * 1.1), converting from milliseconds and forgetting to round (ms / 1000), or reading a decimal from a config file.","solutions":["Round to a whole second: Math.round(timeoutInSeconds) (or ceil to be safe).","When converting from ms: Math.round(ms / 1000).","Use integer literals in config."],"exampleFix":"// before\nconst timeoutInSeconds = estimatedMs / 1000; // e.g. 119750 / 1000 = 119.75\n\n// after\nconst timeoutInSeconds = Math.round(estimatedMs / 1000);","handlingStrategy":"validation","validationCode":"const timeoutInSeconds = Math.round(Number(raw));","typeGuard":"const isIntegerSeconds = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isInteger(v);","tryCatchPattern":null,"preventionTips":["Round when converting from milliseconds (ms / 1000).","Keep timeout values as integer literals in config.","Type the field as number and assert integer at the boundary."],"tags":["lambda","validation","timeout","configuration","deploy"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}