🎥 Make videos programmatically with React
import path from 'path';
import {CliInternals} from '@remotion/cli';
import {ConfigInternals} from '@remotion/cli/config';
import {
LambdaClientInternals,
getRenderProgress,
type EnhancedErrorInfo,
type ServerlessCodec,
} from '@remotion/lambda-client';
import {
BINARY_NAME,
DEFAULT_MAX_RETRIES,
DEFAULT_OUTPUT_PRIVACY,
} from '@remotion/lambda-client/constants';
import type {
ChromiumOptions,
LogLevel,
SingleFrameRange,
} from '@remotion/renderer';
import {RenderInternals} from '@remotion/renderer';
import {BrowserSafeApis} from '@remotion/renderer/client';
import {NoReactInternals} from 'remotion/no-react';
import {internalDownloadMedia} from '../../../api/download-media';
import {sleep} from '../../../shared/sleep';
import {validateMaxRetries} from '../../../shared/validate-retries';
import {parsedLambdaCli} from '../../args';
import {getAwsRegion} from '../../get-aws-region';
import {findFunctionName} from '../../helpers/find-function-name';
import {
getS3OutputProviderFromCli,
makeOutNameWithCustomCredentials,
} from '../../helpers/get-s3-output-provider-from-cli';
import {getWebhookCustomData} from '../../helpers/get-webhook-custom-data';
import {quit} from '../../helpers/quit';
import {Log} from '../../log';
import {RENDER_COMMAND} from '../command-names';
import {makeProgressString} from './progress';
export {RENDER_COMMAND} from '../command-names';
const {
x264Option,
audioBitrateOption,
offthreadVideoCacheSizeInBytesOption,
offthreadVideoThreadsOption,
scaleOption,
crfOption,
gopSizeOption,
disableSharedMemoryCaptureOption,
jpegQualityOption,
videoBitrateOption,
mutedOption,
colorSpaceOption,
deleteAfterOption,
enableMultiprocessOnLinuxOption,
glOption,
headlessOption,
numberOfGifLoopsOption,
encodingMaxRateOption,
encodingBufferSizeOption,
delayRenderTimeoutInMillisecondsOption,
overwriteOption,
binariesDirectoryOption,
preferLosslessOption,
metadataOption,
mediaCacheSizeInBytesOption,
darkModeOption,
pixelFormatOption,
browserExecutableOption,
everyNthFrameOption,
proResProfileOption,
userAgentOption,
disableWebSecurityOption,
ignoreCertificateErrorsOption,
audioCodecOption,
videoCodecOption,
overrideHeightOption,
overrideWidthOption,
overrideFpsOption,
overrideDurationOption,
sampleRateOption,
enableCancellationOption,
separateAudioOption,
} = BrowserSafeApis.options;
export const renderCommand = async ({
args,
remotionRoot,
logLevel,
}: {
args: string[];
remotionRoot: string;
logLevel: LogLevel;
}) => {
const serveUrl = args[0];
if (!serveUrl) {
Log.error({indent: false, logLevel}, 'No serve URL passed.');
Log.info(
{indent: false, logLevel},
'Pass an additional argument specifying a URL where your Remotion project is hosted.',
);
Log.info({indent: false, logLevel});
Log.info(
{indent: false, logLevel},
`${BINARY_NAME} ${RENDER_COMMAND} <serve-url> <composition-id> [output-location]`,
);
quit(1);
}
const region = getAwsRegion();
const {envVariables, frameRange, inputProps, selectedFrames} =
CliInternals.getCliOptions({
isStill: false,
logLevel,
indent: false,
});
if (
selectedFrames !== null ||
(Array.isArray(frameRange) && Array.isArray(frameRange[0]))
) {
throw new Error(
'Comma-separated frame selections are only supported by the local `remotion render` command. Pass one frame range to render a video on Lambda.',
);
}
const shouldOutputImageSequence =
Boolean(CliInternals.parsedCli.sequence) ||
ConfigInternals.getShouldOutputImageSequence(null);
const singleFrameRange = frameRange as SingleFrameRange | null;
const enableCancellation = enableCancellationOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const height = overrideHeightOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const width = overrideWidthOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const fps = overrideFpsOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const durationInFrames = overrideDurationOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const pixelFormat = pixelFormatOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const browserExecutable = browserExecutableOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const everyNthFrame = everyNthFrameOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const proResProfile = proResProfileOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const userAgent = userAgentOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const disableWebSecurity = disableWebSecurityOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const ignoreCertificateErrors = ignoreCertificateErrorsOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const x264Preset = x264Option.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const audioBitrate = audioBitrateOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const offthreadVideoCacheSizeInBytes =
offthreadVideoCacheSizeInBytesOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const mediaCacheSizeInBytes = mediaCacheSizeInBytesOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const offthreadVideoThreads = offthreadVideoThreadsOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const scale = scaleOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const crf = crfOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const disableSharedMemoryCapture = disableSharedMemoryCaptureOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const gopSize = gopSizeOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const jpegQuality = jpegQualityOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const videoBitrate = videoBitrateOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const muted = mutedOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const colorSpace = colorSpaceOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const deleteAfter = deleteAfterOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const enableMultiProcessOnLinux = enableMultiprocessOnLinuxOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const gl = glOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const headless = headlessOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const numberOfGifLoops = numberOfGifLoopsOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const encodingMaxRate = encodingMaxRateOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const encodingBufferSize = encodingBufferSizeOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const timeoutInMilliseconds = delayRenderTimeoutInMillisecondsOption.getValue(
{
commandLine: CliInternals.parsedCli,
},
).value;
const overwrite = overwriteOption.getValue(
{
commandLine: CliInternals.parsedCli,
},
false,
).value;
const binariesDirectory = binariesDirectoryOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const preferLossless = preferLosslessOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const metadata = metadataOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const sampleRate = sampleRateOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const darkMode = darkModeOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const audioCodec = audioCodecOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const chromiumOptions: Required<ChromiumOptions> = {
disableWebSecurity,
enableMultiProcessOnLinux,
gl,
headless,
ignoreCertificateErrors,
userAgent,
darkMode,
};
let composition: string = args[1];
if (!composition) {
Log.info(
{indent: false, logLevel},
'No compositions passed. Fetching compositions...',
);
LambdaClientInternals.validateServeUrl(serveUrl);
if (!serveUrl.startsWith('https://') && !serveUrl.startsWith('http://')) {
throw Error(
'Passing the shorthand serve URL without a composition ID is currently not supported.\n Make sure to pass a composition ID after the shorthand serve URL or pass the complete serveURL without a composition ID to choose between all compositions.',
);
}
const server = await RenderInternals.prepareServer({
offthreadVideoThreads: 1,
indent: false,
port: ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
remotionRoot,
logLevel,
webpackConfigOrServeUrl: serveUrl,
offthreadVideoCacheSizeInBytes,
binariesDirectory,
forceIPv4: false,
sampleRate: 48000,
});
const indent = false;
const {compositionId} =
await CliInternals.getCompositionWithDimensionOverride({
args: args.slice(1),
compositionIdFromUi: null,
browserExecutable,
chromiumOptions,
envVariables,
height,
width,
fps,
durationInFrames,
indent,
serializedInputPropsWithCustomSchema:
NoReactInternals.serializeJSONWithSpecialTypes({
indent: undefined,
staticBase: null,
data: inputProps,
}).serializedString,
port: ConfigInternals.getRendererPortFromConfigFileAndCliFlag(),
puppeteerInstance: undefined,
serveUrlOrWebpackUrl: serveUrl,
timeoutInMilliseconds,
logLevel,
server,
offthreadVideoCacheSizeInBytes,
offthreadVideoThreads,
binariesDirectory,
onBrowserDownload: CliInternals.defaultBrowserDownloadProgress({
indent,
logLevel,
quiet: CliInternals.quietFlagProvided(),
onProgress: () => undefined,
}),
chromeMode: 'headless-shell',
mediaCacheSizeInBytes: mediaCacheSizeInBytes,
});
composition = compositionId;
}
const outName = shouldOutputImageSequence
? (parsedLambdaCli['output-prefix'] ?? parsedLambdaCli['out-name'])
: parsedLambdaCli['out-name'];
const s3OutputProvider = getS3OutputProviderFromCli({
endpoint: parsedLambdaCli['s3-output-provider-endpoint'],
region: parsedLambdaCli['s3-output-provider-region'],
forcePathStyle:
parsedLambdaCli['s3-output-provider-force-path-style'] || undefined,
});
const resolvedOutName = makeOutNameWithCustomCredentials({
bucketName: parsedLambdaCli['force-bucket-name'],
key: outName,
s3OutputProvider,
});
const downloadName = args[2] ?? null;
const separateAudioTo = separateAudioOption.getValue({
commandLine: CliInternals.parsedCli,
}).value;
const {value: codec, source: reason} = shouldOutputImageSequence
? {value: null, source: 'image sequence'}
: videoCodecOption.getValue(
{
commandLine: CliInternals.parsedCli,
},
{
downloadName,
outName: outName ?? null,
configFile: ConfigInternals.getOutputCodecOrUndefined() ?? null,
uiCodec: null,
compositionCodec: null,
},
);
const imageFormat = BrowserSafeApis.options.videoImageFormatOption.getValue(
{
commandLine: CliInternals.parsedCli,
},
{
codec: codec ?? undefined,
uiVideoImageFormat: null,
compositionDefaultVideoImageFormat: null,
},
).value;
if (imageFormat === null) {
throw new Error('Expected image format to be resolved');
}
const functionName = await findFunctionName({logLevel});
const maxRetries = parsedLambdaCli['max-retries'] ?? DEFAULT_MAX_RETRIES;
validateMaxRetries(maxRetries);
const privacy = parsedLambdaCli.privacy ?? DEFAULT_OUTPUT_PRIVACY;
LambdaClientInternals.validatePrivacy(privacy, true);
const framesPerLambda = parsedLambdaCli['frames-per-lambda'] ?? undefined;
const concurrency = parsedLambdaCli['concurrency'] ?? undefined;
const concurrencyPerLambda = parsedLambdaCli['concurrency-per-lambda'] ?? 1;
const rendererFunctionName =
parsedLambdaCli['renderer-function-name'] ?? null;
const webhookCustomData = getWebhookCustomData(logLevel);
const res = await LambdaClientInternals.internalRenderMediaOnLambdaRaw({
enableCancellation,
functionName,
serveUrl,
inputProps,
codec: shouldOutputImageSequence ? null : (codec as ServerlessCodec),
output: shouldOutputImageSequence
? {
type: 'sequence',
outputPrefix:
typeof resolvedOutName === 'object' && resolvedOutName !== null
? {
bucketName: resolvedOutName.bucketName,
keyPrefix: resolvedOutName.key,
s3OutputProvider: resolvedOutName.s3OutputProvider,
}
: resolvedOutName,
imageSequencePattern:
BrowserSafeApis.options.imageSequencePatternOption.getValue({
commandLine: CliInternals.parsedCli,
}).value,
}
: {type: 'media'},
imageFormat,
crf: crf ?? undefined,
gopSize,
disableSharedMemoryCapture,
envVariables,
pixelFormat,
proResProfile,
jpegQuality,
region,
maxRetries,
composition,
framesPerLambda: framesPerLambda ?? null,
concurrency: concurrency ?? null,
privacy,
logLevel,
frameRange: singleFrameRange,
outName: resolvedOutName,
separateAudioTo,
timeoutInMilliseconds,
chromiumOptions,
scale,
numberOfGifLoops,
everyNthFrame,
concurrencyPerLambda,
muted,
overwrite,
audioBitrate,
videoBitrate,
encodingBufferSize,
encodingMaxRate,
forceHeight: height,
forceWidth: width,
forceFps: fps,
forceDurationInFrames: durationInFrames,
webhook: parsedLambdaCli.webhook
? {
url: parsedLambdaCli.webhook,
secret: parsedLambdaCli['webhook-secret'] ?? null,
customData: webhookCustomData,
}
: null,
rendererFunctionName,
forceBucketName: parsedLambdaCli['force-bucket-name'] ?? null,
audioCodec,
deleteAfter: deleteAfter ?? null,
colorSpace,
downloadBehavior: {type: 'play-in-browser'},
offthreadVideoCacheSizeInBytes: offthreadVideoCacheSizeInBytes ?? null,
mediaCacheSizeInBytes: mediaCacheSizeInBytes ?? null,
offthreadVideoThreads: offthreadVideoThreads ?? null,
x264Preset: x264Preset ?? null,
preferLossless,
indent: false,
forcePathStyle: parsedLambdaCli['force-path-style'] ?? false,
metadata: metadata ?? null,
licenseKey:
parsedLambdaCli[BrowserSafeApis.options.licenseKeyOption.cliFlag] ?? null,
storageClass: parsedLambdaCli['storage-class'] ?? null,
requestHandler: null,
isProduction:
parsedLambdaCli[BrowserSafeApis.options.isProductionOption.cliFlag] ??
true,
sampleRate,
});
const unregisterCtrlCHandler = CliInternals.registerCtrlCHandler(async () => {
if (!enableCancellation) {
Log.info(
{indent: false, logLevel},
'Stopped waiting. The Lambda render is still running.',
);
Log.info(
{indent: false, logLevel},
'Use --enable-cancellation to allow Ctrl+C to cancel it.',
);
return 130;
}
Log.info({indent: false, logLevel}, 'Cancelling Lambda render...');
try {
await LambdaClientInternals.internalCancelRenderOnLambda({
bucketName: res.bucketName,
region,
renderId: res.renderId,
forcePathStyle: parsedLambdaCli['force-path-style'] ?? false,
requestHandler: null,
});
} catch (err) {
Log.error(
{indent: false, logLevel},
`Could not cancel the Lambda render: ${err instanceof Error ? err.message : String(err)}`,
);
Log.info(
{indent: false, logLevel},
'The Lambda render may still be running.',
);
return 1;
}
Log.info({indent: false, logLevel}, 'Cancellation signal sent.');
return 130;
});
const progressBar = CliInternals.createOverwriteableCliOutput({
quiet: CliInternals.quietFlagProvided(),
cancelSignal: null,
// No browser logs in Lambda
updatesDontOverwrite: false,
indent: false,
logLevel,
});
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray(
`Bucket: ${CliInternals.makeHyperlink({text: res.bucketName, fallback: res.bucketName, url: LambdaClientInternals.getS3BucketUrl({region: getAwsRegion(), bucketName: res.bucketName})})}`,
),
);
if (enableCancellation) {
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray('Press Ctrl+C to cancel the render.'),
);
}
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray(
`Function: ${CliInternals.makeHyperlink({text: functionName, fallback: functionName, url: LambdaClientInternals.getLambdaFunctionUrl({region: getAwsRegion(), functionName})})}`,
),
);
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray(
`Render ID: ${CliInternals.makeHyperlink({text: res.renderId, fallback: res.renderId, url: res.folderInS3Console})}`,
),
);
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray(
`progress.json: ${CliInternals.makeHyperlink({
text: (clickInstruction) => {
return `${clickInstruction} to view`;
},
fallback: res.progressJsonInConsole,
url: res.progressJsonInConsole,
})}`,
),
);
if (shouldOutputImageSequence) {
Log.info(
{indent: false, logLevel},
CliInternals.chalk.gray(`Image format: ${imageFormat}`),
);
} else {
Log.info(
{
indent: false,
logLevel,
},
CliInternals.chalk.gray(
`${CliInternals.makeHyperlink({
text: 'Codec',
fallback: 'Codec',
url: 'https://remotion.dev/docs/encoding',
})}: ${codec} (${reason})`,
),
);
}
Log.verbose(
{indent: false, logLevel},
'CloudWatch logs (if enabled):',
CliInternals.makeHyperlink({
text: `Main function`,
url: res.cloudWatchMainLogs,
fallback: res.cloudWatchMainLogs,
}),
...(concurrency === 1 && rendererFunctionName === null
? []
: [
CliInternals.makeHyperlink({
text: `Renderer functions`,
url: res.cloudWatchLogs,
fallback: res.cloudWatchLogs,
}),
]),
);
Log.verbose(
{indent: false, logLevel},
'Lambda insights: (if enabled):',
CliInternals.makeHyperlink({
text: (instruction) => `${instruction} to view`,
url: res.lambdaInsightsLogs,
fallback: res.lambdaInsightsLogs,
}),
);
if (!CliInternals.supportsHyperlink()) {
Log.verbose(
{indent: false, logLevel},
CliInternals.makeHyperlink({
text: (instruction) => `${instruction} for Render folder`,
url: res.folderInS3Console,
fallback: `Render folder: ${res.folderInS3Console}`,
}),
);
}
const adheresToFunctionNameConvention =
LambdaClientInternals.parseFunctionName(functionName);
const status = await getRenderProgress({
functionName,
bucketName: res.bucketName,
renderId: res.renderId,
region: getAwsRegion(),
logLevel,
skipLambdaInvocation: Boolean(adheresToFunctionNameConvention),
s3OutputProvider: s3OutputProvider ?? undefined,
});
progressBar.update(
makeProgressString({
downloadInfo: null,
overall: status,
}),
false,
);
// eslint-disable-next-line no-constant-condition
while (true) {
await sleep(500);
const newStatus = await getRenderProgress({
functionName,
bucketName: res.bucketName,
renderId: res.renderId,
region: getAwsRegion(),
logLevel,
s3OutputProvider: s3OutputProvider ?? undefined,
});
progressBar.update(
makeProgressString({
downloadInfo: null,
overall: newStatus,
}),
false,
);
if (newStatus.done) {
unregisterCtrlCHandler();
let downloadOrNothing;
if (downloadName) {
const downloadStart = Date.now();
const download = await internalDownloadMedia({
output: 'main',
bucketName: res.bucketName,
outPath: downloadName,
region: getAwsRegion(),
renderId: res.renderId,
logLevel,
onProgress: ({downloaded, totalSize}) => {
progressBar.update(
makeProgressString({
downloadInfo: {
doneIn: null,
downloaded,
totalSize,
},
overall: newStatus,
}),
false,
);
},
forcePathStyle: parsedLambdaCli['force-path-style'],
signal: new AbortController().signal,
customCredentials: s3OutputProvider,
requestHandler: null,
});
downloadOrNothing = download;
progressBar.update(
makeProgressString({
downloadInfo: {
doneIn: Date.now() - downloadStart,
downloaded: download.sizeInBytes,
totalSize: download.sizeInBytes,
},
overall: newStatus,
}),
false,
);
}
const outputUrl = newStatus.outputSequence
? `${LambdaClientInternals.getS3BucketUrl({
region: getAwsRegion(),
bucketName: newStatus.outputSequence.bucketName,
})}&prefix=${encodeURIComponent(newStatus.outputSequence.keyPrefix)}`
: (newStatus.outputFile as string);
Log.info({indent: false, logLevel});
const separateAudio = newStatus.separateAudio ?? null;
for (const output of [
...(separateAudio === null ? [] : [separateAudio]),
{
url: outputUrl,
key:
newStatus.outputSequence?.keyPrefix ?? (newStatus.outKey as string),
sizeInBytes: newStatus.outputSizeInBytes as number,
},
]) {
Log.info(
{indent: false, logLevel},
CliInternals.chalk.blue(
`${(separateAudio === null ? '+ S3' : '+').padEnd(CliInternals.LABEL_WIDTH)} ${CliInternals.makeHyperlink({fallback: output.url, text: output.key, url: output.url})}`,
),
CliInternals.chalk.gray(CliInternals.formatBytes(output.sizeInBytes)),
);
}
if (downloadOrNothing) {
const relativeOutputPath = path.relative(
process.cwd(),
downloadOrNothing.outputPath,
);
Log.info(
{indent: false, logLevel},
CliInternals.chalk.blue('↓'.padEnd(CliInternals.LABEL_WIDTH)),
CliInternals.chalk.blue(
CliInternals.makeHyperlink({
url: `file://${downloadOrNothing.outputPath}`,
text: relativeOutputPath,
fallback: downloadOrNothing.outputPath,
}),
),
CliInternals.chalk.gray(
CliInternals.formatBytes(downloadOrNothing.sizeInBytes),
),
);
}
Log.info({indent: false, logLevel});
Log.info(
{indent: false, logLevel},
[
newStatus.renderMetadata
? `${newStatus.renderMetadata.estimatedTotalLambdaInvokations} λ's used`
: null,
newStatus.timeToFinish
? `${(newStatus.timeToFinish / 1000).toFixed(2)}sec`
: null,
`Estimated cost ${newStatus.costs.displayCost}`,
]
.filter(Boolean)
.join(', '),
);
if (newStatus.mostExpensiveFrameRanges) {
Log.verbose({indent: false, logLevel}, 'Most expensive frame ranges:');
Log.verbose(
{indent: false, logLevel},
newStatus.mostExpensiveFrameRanges
.map((f) => {
return `${f.frameRange[0]}-${f.frameRange[1]} (Chunk ${f.chunk}, ${f.timeInMilliseconds}ms)`;
})
.join(', '),
);
}
quit(0);
}
if (newStatus.fatalErrorEncountered) {
unregisterCtrlCHandler();
Log.error({indent: false, logLevel}, '\n');
const uniqueErrors: EnhancedErrorInfo[] = [];
for (const err of newStatus.errors) {
if (uniqueErrors.find((e) => e.stack === err.stack)) {
continue;
}
uniqueErrors.push(err);
if (err.explanation) {
Log.error({indent: false, logLevel}, err.explanation);
}
const frames = RenderInternals.parseStack(err.stack.split('\n'));
const errorWithStackFrame = new RenderInternals.SymbolicateableError({
message: err.message,
frame: err.frame,
name: err.name,
stack: err.stack,
stackFrame: frames,
chunk: err.chunk,
});
await CliInternals.printError(errorWithStackFrame, logLevel);
}
Log.info({indent: false, logLevel});
Log.info(
{indent: false, logLevel},
`Accrued costs until error was thrown: ${newStatus.costs.displayCost}.`,
);
Log.info(
{indent: false, logLevel},
'This is an estimate and continuing Lambda functions may incur additional costs.',
);
quit(1);
}
}
};