{"record":{"id":"e8621fdf20bd813c","repo":"remotion-dev/remotion","slug":"parameter-timeoutinseconds-must-be-between-min","errorCode":null,"errorMessage":"parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT} and ${MAX_TIMEOUT}, but got ${timeoutInSeconds}","messagePattern":"parameter 'timeoutInSeconds' must be between (.+?) and (.+?), but got (.+?)","errorType":"validation","errorClass":"TypeError","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/shared/validate-timeout.ts","lineNumber":21,"sourceCode":"export const validateTimeout = (timeoutInSeconds: unknown) => {\n\tif (typeof timeoutInSeconds !== 'number') {\n\t\tthrow new TypeError(\n\t\t\t`parameter 'timeoutInSeconds' must be a number, but got a ${typeof timeoutInSeconds}`,\n\t\t);\n\t}\n\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":3,"sourceCodeEnd":32,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/shared/validate-timeout.ts#L3-L32","documentation":"Thrown by validateTimeout() in @remotion/lambda when timeoutInSeconds is a finite number outside the allowed range [MIN_TIMEOUT (15), MAX_TIMEOUT (900)] seconds. AWS Lambda allows function timeouts up to 900s (15 min); Remotion additionally enforces a 15s minimum below which renders cannot reasonably run.","triggerScenarios":"Passing timeoutInSeconds < 15 (e.g. 10) or > 900 (e.g. 1200) to deployFunction() or related APIs.","commonSituations":"Setting a very low timeout to 'save cost' that undercuts the minimum; assuming AWS's 15-minute ceiling is in minutes and passing 1200 (thinking 20 min); copying a value from another tool with different units (milliseconds vs seconds).","solutions":["Pick a value in [15, 900]; for long renders use 900 (the maximum).","Clamp automatically: const t = Math.min(Math.max(requested, 15), 900);","Double-check the unit: this option is SECONDS, not milliseconds or minutes."],"exampleFix":"// before\nawait deployFunction({ timeoutInSeconds: 1200 }); // over the 900s Lambda ceiling\n\n// after\nawait deployFunction({ timeoutInSeconds: 900 });","handlingStrategy":"validation","validationCode":"import {MAX_TIMEOUT, MIN_TIMEOUT} from '@remotion/lambda-client/constants';\nif (timeoutInSeconds < MIN_TIMEOUT || timeoutInSeconds > MAX_TIMEOUT) {\n  throw new Error(`timeoutInSeconds must be in [${MIN_TIMEOUT}, ${MAX_TIMEOUT}]`);\n}","typeGuard":"import {MAX_TIMEOUT, MIN_TIMEOUT} from '@remotion/lambda-client/constants';\nconst isValidTimeout = (v: unknown): v is number =>\n  typeof v === 'number' && Number.isInteger(v) && v >= MIN_TIMEOUT && v <= MAX_TIMEOUT;","tryCatchPattern":null,"preventionTips":["Remember the unit is seconds and the AWS ceiling is 900 (15 min).","Clamp user-supplied timeouts to the allowed range.","Document the range at the config boundary so callers don't guess."],"tags":["lambda","validation","timeout","configuration","deploy","aws-limits"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}