remotion-dev/remotion · error · TypeError
parameter 'diskSizeInMb' must be between ${MIN_EPHEMERAL_STO
Error message
parameter 'diskSizeInMb' must be between ${MIN_EPHEMERAL_STORAGE_IN_MB} and ${MAX_EPHEMERAL_STORAGE_IN_MB}, but got ${diskSizeInMb} What it means
Fourth guard in validateDiskSizeInMb: the value must fall within [MIN_EPHEMERAL_STORAGE_IN_MB (512), MAX_EPHEMERAL_STORAGE_IN_MB (10240)] inclusive, matching AWS Lambda's ephemeral storage bounds. Out-of-range values throw a TypeError naming the valid range.
Source
Thrown at packages/lambda-client/src/validate-disk-size-in-mb.ts:27
`parameter 'diskSizeInMb' must be a number, got a ${typeof diskSizeInMb}`,
);
}
if (Number.isNaN(diskSizeInMb)) {
throw new TypeError(`parameter 'diskSizeInMb' must not be NaN, but is`);
}
if (!Number.isFinite(diskSizeInMb)) {
throw new TypeError(
`parameter 'diskSizeInMb' must be finite, but is ${diskSizeInMb}`,
);
}
if (
diskSizeInMb < MIN_EPHEMERAL_STORAGE_IN_MB ||
diskSizeInMb > MAX_EPHEMERAL_STORAGE_IN_MB
) {
throw new TypeError(
`parameter 'diskSizeInMb' must be between ${MIN_EPHEMERAL_STORAGE_IN_MB} and ${MAX_EPHEMERAL_STORAGE_IN_MB}, but got ${diskSizeInMb}`,
);
}
if (diskSizeInMb % 1 !== 0) {
throw new TypeError(
`parameter 'diskSizeInMb' must be an integer but got ${diskSizeInMb}`,
);
}
};
View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Set diskSizeInMb to a value between 512 and 10240 inclusive.
- If you need more than 10 GB, mount EFS instead of relying on ephemeral storage.
- Round up small values to the 512 MB minimum.
Example fix
// before validateDiskSizeInMb(100); // below minimum validateDiskSizeInMb(50000); // above maximum // after validateDiskSizeInMb(512); // minimum validateDiskSizeInMb(10240); // maximum
Defensive patterns
Strategy: validation
Validate before calling
import { MIN_EPHEMERAL_STORAGE_IN_MB, MAX_EPHEMERAL_STORAGE_IN_MB } from '@remotion/lambda-client';
if (diskSizeInMb < MIN_EPHEMERAL_STORAGE_IN_MB || diskSizeInMb > MAX_EPHEMERAL_STORAGE_IN_MB) {
throw new RangeError(`diskSizeInMb must be ${MIN_EPHEMERAL_STORAGE_IN_MB}-${MAX_EPHEMERAL_STORAGE_IN_MB}`);
} Type guard
import { MIN_EPHEMERAL_STORAGE_IN_MB, MAX_EPHEMERAL_STORAGE_IN_MB } from '@remotion/lambda-client';
const isInRangeDisk = (v: unknown): v is number =>
typeof v === 'number' && v >= MIN_EPHEMERAL_STORAGE_IN_MB && v <= MAX_EPHEMERAL_STORAGE_IN_MB; Prevention
- Source MIN/MAX constants from the package rather than hardcoding.
- Use EFS if you need more than 10 GB.
- Clamp user-supplied values to the valid range in your UI.
When it happens
Trigger: Calling validateDiskSizeInMb with a finite number outside 512-10240, e.g. 100, 0, 50000, or a value within range but stepped incorrectly (this specific check is range only).
Common situations: Requesting too little storage (< 512 MB, below AWS minimum); requesting more than 10 GB (above AWS maximum for Lambda ephemeral); copying on-prem disk sizing assumptions; config defaults set before AWS raised the limit.
Related errors
- Disk size must be a positive integer. Received: ${diskSizeIn
- parameter 'diskSizeInMb' must be an integer but got ${diskSi
- parameter 'timeoutInSeconds' must be between ${MIN_TIMEOUT}
- Multiple frame ranges are not supported on Lambda. Use rende
- quality has been renamed to jpegQuality. Please rename the o
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/794ecbd97df0045e.
Report an issue: GitHub.