🎥 Make videos programmatically with React
allow renderstillon lambda custom out key
Jonny Burgerc4158828016a
diff --git a/packages/lambda/src/api/render-still-on-lambda.ts b/packages/lambda/src/api/render-still-on-lambda.tsindex 5ff01dac2b..f4808f231a 100644--- a/packages/lambda/src/api/render-still-on-lambda.ts+++ b/packages/lambda/src/api/render-still-on-lambda.ts@@ -1,14 +1,10 @@import type {ChromiumOptions} from '@remotion/renderer';-import type { LogLevel, StillImageFormat} from 'remotion';+import type {LogLevel, StillImageFormat} from 'remotion';import {Internals} from 'remotion';import type {AwsRegion} from '../pricing/aws-regions';import {callLambda} from '../shared/call-lambda';-import type {- CostsInfo} from '../shared/constants';-import {- DEFAULT_MAX_RETRIES,- LambdaRoutines,-} from '../shared/constants';+import type {CostsInfo, OutNameInput} from '../shared/constants';+import {DEFAULT_MAX_RETRIES, LambdaRoutines} from '../shared/constants';import {convertToServeUrl} from '../shared/convert-to-serve-url';export type RenderStillOnLambdaInput = {@@ -24,7 +20,7 @@ export type RenderStillOnLambdaInput = {quality?: number;frame?: number;logLevel?: LogLevel;- outName?: string;+ outName?: OutNameInput;timeoutInMilliseconds?: number;chromiumOptions?: ChromiumOptions;scale?: number;diff --git a/packages/lambda/src/functions/still.ts b/packages/lambda/src/functions/still.tsindex 28a881aaa5..c3ea735834 100644--- a/packages/lambda/src/functions/still.ts+++ b/packages/lambda/src/functions/still.ts@@ -2,7 +2,7 @@ import {InvokeCommand} from '@aws-sdk/client-lambda';import {RenderInternals, renderStill} from '@remotion/renderer';import fs from 'fs';import path from 'path';-import type { StillImageFormat} from 'remotion';+import type {StillImageFormat} from 'remotion';import {Internals} from 'remotion';import {estimatePrice} from '../api/estimate-price';import {getOrCreateBucket} from '../api/get-or-create-bucket';@@ -10,7 +10,8 @@ import {getLambdaClient} from '../shared/aws-clients';import type {LambdaPayload,LambdaPayloads,- RenderMetadata} from '../shared/constants';+ RenderMetadata,+} from '../shared/constants';import {CURRENT_VERSION,LambdaRoutines,@@ -128,7 +129,7 @@ const innerStillHandler = async (timeoutInMilliseconds: lambdaParams.timeoutInMilliseconds,});- const {key: outName, renderBucketName} = getExpectedOutName(+ const {key, renderBucketName} = getExpectedOutName(renderMetadata,bucketName);@@ -137,7 +138,7 @@ const innerStillHandler = async (await lambdaWriteFile({bucketName: renderBucketName,- key: outName,+ key,privacy: lambdaParams.privacy,body: fs.createReadStream(outputPath),expectedBucketOwner: options.expectedBucketOwner,diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex 33f0e4bef6..89c99b35e4 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -269,7 +269,7 @@ export type LambdaPayloads = {frame: number;privacy: Privacy;logLevel: LogLevel;- outName: string | null;+ outName: OutNameInput | null;timeoutInMilliseconds: number;chromiumOptions: ChromiumOptions;scale: number;