🎥 Make videos programmatically with React
custom credentials
Jonny Burgerdc59fe5cd65f
diff --git a/packages/lambda/src/api/download-media.ts b/packages/lambda/src/api/download-media.tsindex 8c533fbab7..cb64f5722c 100644--- a/packages/lambda/src/api/download-media.ts+++ b/packages/lambda/src/api/download-media.ts@@ -1,12 +1,11 @@import {RenderInternals} from '@remotion/renderer';import path from 'path';import {getExpectedOutName} from '../functions/helpers/expected-out-name';-import {getCustomOutName} from '../functions/helpers/get-custom-out-name';import {getRenderMetadata} from '../functions/helpers/get-render-metadata';import type {LambdaReadFileProgress} from '../functions/helpers/read-with-progress';import {lambdaDownloadFileWithProgress} from '../functions/helpers/read-with-progress';import type {AwsRegion} from '../pricing/aws-regions';-import type {CustomCredentials} from '../shared/aws-clients';+import type {CustomS3Credentials} from '../shared/aws-clients';import {getAccountId} from '../shared/get-account-id';export type DownloadMediaInput = {@@ -15,7 +14,7 @@ export type DownloadMediaInput = {renderId: string;outPath: string;onProgress?: LambdaReadFileProgress;- customCredentials?: CustomCredentials;+ customCredentials?: CustomS3Credentials;};export type DownloadMediaOutput = {@@ -42,10 +41,7 @@ export const downloadMedia = async (const {key, renderBucketName, customCredentials} = getExpectedOutName(renderMetadata,input.bucketName,- getCustomOutName({- renderMetadata,- customCredentials: input.customCredentials ?? null,- })+ input.customCredentials ?? null);const {sizeInBytes} = await lambdaDownloadFileWithProgress({diff --git a/packages/lambda/src/api/get-aws-client.ts b/packages/lambda/src/api/get-aws-client.tsindex 89ef41e445..6adaea708e 100644--- a/packages/lambda/src/api/get-aws-client.ts+++ b/packages/lambda/src/api/get-aws-client.ts@@ -4,13 +4,13 @@ import * as LambdaSDK from '@aws-sdk/client-lambda';import * as S3SDK from '@aws-sdk/client-s3';import * as ServiceQuotasSDK from '@aws-sdk/client-service-quotas';import type {AwsRegion} from '../client';-import type {CustomCredentials, ServiceMapping} from '../shared/aws-clients';+import type {CustomS3Credentials, ServiceMapping} from '../shared/aws-clients';import {getServiceClient} from '../shared/aws-clients';export type GetAwsClientInput<T extends keyof ServiceMapping> = {region: AwsRegion;service: T;- customCredentials?: CustomCredentials | null;+ customCredentials?: CustomS3Credentials | null;};type SdkMapping = {diff --git a/packages/lambda/src/api/get-render-progress.ts b/packages/lambda/src/api/get-render-progress.tsindex 500621ebaf..ffe3262a14 100644--- a/packages/lambda/src/api/get-render-progress.ts+++ b/packages/lambda/src/api/get-render-progress.ts@@ -1,6 +1,6 @@import {VERSION} from 'remotion/version';import type {AwsRegion} from '../pricing/aws-regions';-import type {CustomCredentials} from '../shared/aws-clients';+import type {CustomS3Credentials} from '../shared/aws-clients';import {callLambda} from '../shared/call-lambda';import type {RenderProgress} from '../shared/constants';import {LambdaRoutines} from '../shared/constants';@@ -10,7 +10,7 @@ export type GetRenderInput = {bucketName: string;renderId: string;region: AwsRegion;- customS3Implementation?: CustomCredentials;+ s3OutputProvider?: CustomS3Credentials;};/**@@ -20,6 +20,7 @@ export type GetRenderInput = {* @param {string} params.bucketName The name of the bucket that was used in the render.* @param {string} params.renderId The ID of the render that was returned by `renderMediaOnLambda()`.* @param {AwsRegion} params.region The region in which the render was triggered.+ * @param {CustomS3Credentials} params.s3OutputProvider? Endpoint and credentials if the output file is stored outside of AWS.* @returns {Promise<RenderProgress>} See documentation for this function to see all properties on the return object.*/export const getRenderProgress = async ({@@ -27,7 +28,7 @@ export const getRenderProgress = async ({bucketName,renderId,region,- customS3Implementation,+ s3OutputProvider,}: GetRenderInput): Promise<RenderProgress> => {const result = await callLambda({functionName,@@ -36,7 +37,7 @@ export const getRenderProgress = async ({bucketName,renderId,version: VERSION,- customS3Implementation,+ customS3Implementation: s3OutputProvider,},region,});diff --git a/packages/lambda/src/cli/commands/render/render.ts b/packages/lambda/src/cli/commands/render/render.tsindex f801c0c8fc..1bd4de0148 100644--- a/packages/lambda/src/cli/commands/render/render.ts+++ b/packages/lambda/src/cli/commands/render/render.ts@@ -101,15 +101,7 @@ export const renderCommand = async (args: string[]) => {privacy,logLevel,frameRange: frameRange ?? undefined,- outName: {- bucketName: 'remotion-lambda-target',- key: 'out-file.mp4',- customS3Implementation: {- endpoint: 'https://fra1.digitaloceanspaces.com',- accessKeyId: process.env.SPACES_ACCESS_KEY as string,- secretAccessKey: process.env.SPACES_ACCESS_SECRET as string,- },- },+ outName: parsedLambdaCli['out-name'],timeoutInMilliseconds: puppeteerTimeout,chromiumOptions,scale,diff --git a/packages/lambda/src/functions/helpers/expected-out-name.ts b/packages/lambda/src/functions/helpers/expected-out-name.tsindex 873d5d520c..30715cf91f 100644--- a/packages/lambda/src/functions/helpers/expected-out-name.ts+++ b/packages/lambda/src/functions/helpers/expected-out-name.ts@@ -2,13 +2,37 @@ import type {Codec} from '@remotion/renderer';import {RenderInternals} from '@remotion/renderer';import type {OutNameInput, OutNameOutput, RenderMetadata} from '../../defaults';import {customOutName, outName, outStillName} from '../../defaults';+import type {CustomS3Credentials} from '../../shared/aws-clients';import {validateOutname} from '../../shared/validate-outname';+import {getCustomOutName} from './get-custom-out-name';++export const getCredentialsFromOutName = (+ name: OutNameInput | null+): CustomS3Credentials | null => {+ if (typeof name === 'string') {+ return null;+ }++ if (name === null) {+ return null;+ }++ if (typeof name === 'undefined') {+ return null;+ }++ return name.customS3Implementation ?? null;+};export const getExpectedOutName = (renderMetadata: RenderMetadata,bucketName: string,- outNameValue: OutNameInput | null+ customCredentials: CustomS3Credentials | null): OutNameOutput => {+ const outNameValue = getCustomOutName({+ customCredentials,+ renderMetadata,+ });if (outNameValue) {validateOutname(outNameValue);return customOutName(renderMetadata.renderId, bucketName, outNameValue);diff --git a/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts b/packages/lambda/src/functions/helpers/find-output-file-in-bucket.tsindex c2868d59be..a9d0116b4f 100644--- a/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts+++ b/packages/lambda/src/functions/helpers/find-output-file-in-bucket.ts@@ -1,9 +1,9 @@import {HeadObjectCommand} from '@aws-sdk/client-s3';import type {AwsRegion} from '../..';import {ROLE_NAME} from '../../api/iam-validation/suggested-policy';-import type {CustomCredentials} from '../../shared/aws-clients';+import type {CustomS3Credentials} from '../../shared/aws-clients';import {getS3Client} from '../../shared/aws-clients';-import type {OutNameInput, RenderMetadata} from '../../shared/constants';+import type {RenderMetadata} from '../../shared/constants';import {getExpectedOutName} from './expected-out-name';import {getOutputUrlFromMetadata} from './get-output-url-from-metadata';@@ -18,13 +18,11 @@ export const findOutputFileInBucket = async ({renderMetadata,bucketName,customCredentials,- outNameValue,}: {region: AwsRegion;renderMetadata: RenderMetadata;bucketName: string;- customCredentials: CustomCredentials | null;- outNameValue: OutNameInput | null;+ customCredentials: CustomS3Credentials | null;}): Promise<OutputFileMetadata | null> => {if (!renderMetadata) {throw new Error('unexpectedly did not get renderMetadata');@@ -46,7 +44,11 @@ export const findOutputFileInBucket = async ({return {lastModified: head.LastModified?.getTime() as number,size: head.ContentLength as number,- url: getOutputUrlFromMetadata(renderMetadata, bucketName, outNameValue),+ url: getOutputUrlFromMetadata(+ renderMetadata,+ bucketName,+ customCredentials+ ),};} catch (err) {if ((err as Error).name === 'NotFound') {@@ -59,7 +61,11 @@ export const findOutputFileInBucket = async ({.httpStatusCode === 403) {throw new Error(- `Unable to access item "${key}" from bucket "${renderBucketName}". The "${ROLE_NAME}" role must have permission for both "s3:GetObject" and "s3:ListBucket" actions.`+ `Unable to access item "${key}" from bucket "${renderBucketName}" ${+ customCredentials?.endpoint+ ? `(S3 Endpoint = ${customCredentials?.endpoint})`+ : ''+ }. The "${ROLE_NAME}" role must have permission for both "s3:GetObject" and "s3:ListBucket" actions.`);}diff --git a/packages/lambda/src/functions/helpers/get-custom-out-name.ts b/packages/lambda/src/functions/helpers/get-custom-out-name.tsindex 103ca8086b..e6ca36c1cc 100644--- a/packages/lambda/src/functions/helpers/get-custom-out-name.ts+++ b/packages/lambda/src/functions/helpers/get-custom-out-name.ts@@ -1,12 +1,12 @@import type {OutNameInput, RenderMetadata} from '../../defaults';-import type {CustomCredentials} from '../../shared/aws-clients';+import type {CustomS3Credentials} from '../../shared/aws-clients';export const getCustomOutName = ({renderMetadata,customCredentials,}: {renderMetadata: RenderMetadata;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;}): OutNameInput | null => {if (!renderMetadata.outName) {return null;@@ -19,7 +19,7 @@ export const getCustomOutName = ({if (renderMetadata.outName.customS3Implementation) {if (!customCredentials && renderMetadata.privacy !== 'public') {throw new TypeError(- `The file was rendered with a custom S3 implementation and is not public, but no custom credentials were passed to the downloadMedia().`+ `The file was rendered with a custom S3 implementation and is not public, but no custom credentials were passed to downloadMedia().`);}diff --git a/packages/lambda/src/functions/helpers/get-output-url-from-metadata.ts b/packages/lambda/src/functions/helpers/get-output-url-from-metadata.tsindex 7833276db0..128daeb4db 100644--- a/packages/lambda/src/functions/helpers/get-output-url-from-metadata.ts+++ b/packages/lambda/src/functions/helpers/get-output-url-from-metadata.ts@@ -1,13 +1,18 @@-import type {OutNameInput, RenderMetadata} from '../../defaults';+import type {RenderMetadata} from '../../defaults';+import type {CustomS3Credentials} from '../../shared/aws-clients';import {getExpectedOutName} from './expected-out-name';import {getCurrentRegionInFunction} from './get-current-region';export const getOutputUrlFromMetadata = (renderMetadata: RenderMetadata,bucketName: string,- outName: OutNameInput | null+ customCredentials: CustomS3Credentials | null) => {- const outname = getExpectedOutName(renderMetadata, bucketName, outName);+ const outname = getExpectedOutName(+ renderMetadata,+ bucketName,+ customCredentials+ );return `https://s3.${getCurrentRegionInFunction()}.amazonaws.com/${outname.renderBucketName}/${outname.key}`;diff --git a/packages/lambda/src/functions/helpers/get-progress.ts b/packages/lambda/src/functions/helpers/get-progress.tsindex feaaa290ef..a4b653d0b8 100644--- a/packages/lambda/src/functions/helpers/get-progress.ts+++ b/packages/lambda/src/functions/helpers/get-progress.ts@@ -1,6 +1,6 @@import {Internals} from 'remotion';import type {AwsRegion} from '../../pricing/aws-regions';-import type {CustomCredentials} from '../../shared/aws-clients';+import type {CustomS3Credentials} from '../../shared/aws-clients';import type {RenderProgress} from '../../shared/constants';import {chunkKey,@@ -19,7 +19,6 @@ import {formatCostsInfo} from './format-costs-info';import {getCleanupProgress} from './get-cleanup-progress';import {getCurrentArchitecture} from './get-current-architecture';import {getCurrentRegionInFunction} from './get-current-region';-import {getCustomOutName} from './get-custom-out-name';import {getEncodingMetadata} from './get-encoding-metadata';import {getFinalEncodingStatus} from './get-final-encoding-status';import {getLambdasInvokedStats} from './get-lambdas-invoked-stats';@@ -47,7 +46,7 @@ export const getProgress = async ({region: AwsRegion;memorySizeInMb: number;timeoutInMiliseconds: number;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;}): Promise<RenderProgress> => {const postRenderData = await getPostRenderData({bucketName,@@ -60,10 +59,7 @@ export const getProgress = async ({const outData = getExpectedOutName(postRenderData.renderMetadata,bucketName,- getCustomOutName({- customCredentials,- renderMetadata: postRenderData.renderMetadata,- })+ customCredentials);return {bucket: bucketName,@@ -165,7 +161,6 @@ export const getProgress = async ({renderMetadata,region,customCredentials,- outNameValue: getCustomOutName({customCredentials, renderMetadata}),}): null;@@ -291,19 +286,12 @@ export const getProgress = async ({retriesInfo,outKey:outputFile && renderMetadata- ? getExpectedOutName(- renderMetadata,- bucketName,- getCustomOutName({customCredentials, renderMetadata})- ).key+ ? getExpectedOutName(renderMetadata, bucketName, customCredentials).key: null,outBucket:outputFile && renderMetadata- ? getExpectedOutName(- renderMetadata,- bucketName,- getCustomOutName({customCredentials, renderMetadata})- ).renderBucketName+ ? getExpectedOutName(renderMetadata, bucketName, customCredentials)+ .renderBucketName: null,mostExpensiveFrameRanges: null,};diff --git a/packages/lambda/src/functions/helpers/io.ts b/packages/lambda/src/functions/helpers/io.tsindex b43fb58259..44d3813774 100644--- a/packages/lambda/src/functions/helpers/io.ts+++ b/packages/lambda/src/functions/helpers/io.ts@@ -9,7 +9,7 @@ import type {ReadStream} from 'fs';import mimeTypes from 'mime-types';import type {Readable} from 'stream';import type {AwsRegion} from '../../pricing/aws-regions';-import type {CustomCredentials} from '../../shared/aws-clients';+import type {CustomS3Credentials} from '../../shared/aws-clients';import {getS3Client} from '../../shared/aws-clients';import type {Privacy} from '../../shared/constants';import type {DownloadBehavior} from '../../shared/content-disposition-header';@@ -110,7 +110,7 @@ export const lambdaWriteFile = async ({privacy: Privacy;expectedBucketOwner: string | null;downloadBehavior: DownloadBehavior | null;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;}): Promise<void> => {await getS3Client(region, customCredentials).send(new PutObjectCommand({diff --git a/packages/lambda/src/functions/helpers/read-with-progress.ts b/packages/lambda/src/functions/helpers/read-with-progress.tsindex 61196a8b2b..aba3030b21 100644--- a/packages/lambda/src/functions/helpers/read-with-progress.ts+++ b/packages/lambda/src/functions/helpers/read-with-progress.ts@@ -2,7 +2,7 @@ import {GetObjectCommand} from '@aws-sdk/client-s3';import {getSignedUrl} from '@aws-sdk/s3-request-presigner';import {RenderInternals} from '@remotion/renderer';import type {AwsRegion} from '../../pricing/aws-regions';-import type {CustomCredentials} from '../../shared/aws-clients';+import type {CustomS3Credentials} from '../../shared/aws-clients';import {getS3Client} from '../../shared/aws-clients';export type LambdaReadFileProgress = (progress: {@@ -26,7 +26,7 @@ export const lambdaDownloadFileWithProgress = async ({expectedBucketOwner: string;outputPath: string;onProgress: LambdaReadFileProgress;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;}): Promise<{sizeInBytes: number; to: string}> => {const client = getS3Client(region, customCredentials);const command = new GetObjectCommand({diff --git a/packages/lambda/src/functions/launch.ts b/packages/lambda/src/functions/launch.tsindex 50dba29321..f46170ac9a 100644--- a/packages/lambda/src/functions/launch.ts+++ b/packages/lambda/src/functions/launch.ts@@ -40,7 +40,6 @@ import {cleanupFiles} from './helpers/delete-chunks';import {getExpectedOutName} from './helpers/expected-out-name';import {getBrowserInstance} from './helpers/get-browser-instance';import {getCurrentRegionInFunction} from './helpers/get-current-region';-import {getCustomOutName} from './helpers/get-custom-out-name';import {getFilesToDelete} from './helpers/get-files-to-delete';import {getLambdasInvokedStats} from './helpers/get-lambdas-invoked-stats';import {getOutputUrlFromMetadata} from './helpers/get-output-url-from-metadata';@@ -343,7 +342,9 @@ const innerLaunchHandler = async (params: LambdaPayload, options: Options) => {const {key, renderBucketName, customCredentials} = getExpectedOutName(renderMetadata,params.bucketName,- params.outName+ typeof params.outName === 'string' || typeof params.outName === 'undefined'+ ? null+ : params.outName?.customS3Implementation ?? null);const outputSize = fs.statSync(outfile);@@ -465,7 +466,7 @@ const innerLaunchHandler = async (params: LambdaPayload, options: Options) => {url: getOutputUrlFromMetadata(renderMetadata,params.bucketName,- getCustomOutName({renderMetadata, customCredentials})+ customCredentials),},});diff --git a/packages/lambda/src/functions/still.ts b/packages/lambda/src/functions/still.tsindex 3bbf7529b5..fb3bbc8ec7 100644--- a/packages/lambda/src/functions/still.ts+++ b/packages/lambda/src/functions/still.ts@@ -22,12 +22,14 @@ import {randomHash} from '../shared/random-hash';import {validateDownloadBehavior} from '../shared/validate-download-behavior';import {validateOutname} from '../shared/validate-outname';import {validatePrivacy} from '../shared/validate-privacy';-import {getExpectedOutName} from './helpers/expected-out-name';+import {+ getCredentialsFromOutName,+ getExpectedOutName,+} from './helpers/expected-out-name';import {formatCostsInfo} from './helpers/format-costs-info';import {getBrowserInstance} from './helpers/get-browser-instance';import {getCurrentArchitecture} from './helpers/get-current-architecture';import {getCurrentRegionInFunction} from './helpers/get-current-region';-import {getCustomOutName} from './helpers/get-custom-out-name';import {getOutputUrlFromMetadata} from './helpers/get-output-url-from-metadata';import {lambdaWriteFile} from './helpers/io';import {validateComposition} from './helpers/validate-composition';@@ -150,7 +152,7 @@ const innerStillHandler = async (const {key, renderBucketName, customCredentials} = getExpectedOutName(renderMetadata,bucketName,- lambdaParams.outName+ getCredentialsFromOutName(lambdaParams.outName));const {size} = await fs.promises.stat(outputPath);@@ -182,7 +184,7 @@ const innerStillHandler = async (output: getOutputUrlFromMetadata(renderMetadata,bucketName,- getCustomOutName({customCredentials, renderMetadata})+ customCredentials),size,bucketName,diff --git a/packages/lambda/src/index.ts b/packages/lambda/src/index.tsindex 6ff6edb58a..26647edae5 100644--- a/packages/lambda/src/index.ts+++ b/packages/lambda/src/index.ts@@ -1,55 +1,42 @@-import type { DeleteFunctionInput} from './api/delete-function';+import type {DeleteFunctionInput} from './api/delete-function';import {deleteFunction} from './api/delete-function';-import type { DeleteSiteInput, DeleteSiteOutput} from './api/delete-site';+import type {DeleteSiteInput, DeleteSiteOutput} from './api/delete-site';import {deleteSite} from './api/delete-site';import type {DeployFunctionInput,- DeployFunctionOutput} from './api/deploy-function';-import {- deployFunction+ DeployFunctionOutput,} from './api/deploy-function';-import type { DeploySiteInput, DeploySiteOutput} from './api/deploy-site';+import {deployFunction} from './api/deploy-function';+import type {DeploySiteInput, DeploySiteOutput} from './api/deploy-site';import {deploySite} from './api/deploy-site';import type {DownloadMediaInput,- DownloadMediaOutput} from './api/download-media';-import {- downloadMedia,- downloadVideo,+ DownloadMediaOutput,} from './api/download-media';-import type { EstimatePriceInput} from './api/estimate-price';+import {downloadMedia, downloadVideo} from './api/download-media';+import type {EstimatePriceInput} from './api/estimate-price';import {estimatePrice} from './api/estimate-price';-import type {- GetAwsClientInput,- GetAwsClientOutput} from './api/get-aws-client';-import {- getAwsClient-} from './api/get-aws-client';-import type {- FunctionInfo,- GetFunctionInfoInput} from './api/get-function-info';-import {- getFunctionInfo-} from './api/get-function-info';-import type { GetFunctionsInput} from './api/get-functions';+import type {GetAwsClientInput, GetAwsClientOutput} from './api/get-aws-client';+import {getAwsClient} from './api/get-aws-client';+import type {FunctionInfo, GetFunctionInfoInput} from './api/get-function-info';+import {getFunctionInfo} from './api/get-function-info';+import type {GetFunctionsInput} from './api/get-functions';import {getFunctions} from './api/get-functions';import type {GetOrCreateBucketInput,- GetOrCreateBucketOutput} from './api/get-or-create-bucket';-import {- getOrCreateBucket+ GetOrCreateBucketOutput,} from './api/get-or-create-bucket';+import {getOrCreateBucket} from './api/get-or-create-bucket';import {getRegions} from './api/get-regions';import type {GetRenderInput} from './api/get-render-progress';-import { getRenderProgress} from './api/get-render-progress';-import type { GetSitesInput, GetSitesOutput} from './api/get-sites';+import {getRenderProgress} from './api/get-render-progress';+import type {GetSitesInput, GetSitesOutput} from './api/get-sites';import {getSites} from './api/get-sites';import type {SimulatePermissionsInput,- SimulatePermissionsOutput} from './api/iam-validation/simulate';-import {- simulatePermissions+ SimulatePermissionsOutput,} from './api/iam-validation/simulate';+import {simulatePermissions} from './api/iam-validation/simulate';import {getRolePolicy,getUserPolicy,@@ -57,20 +44,21 @@ import {import {presignUrl} from './api/presign-url';import type {RenderMediaOnLambdaInput,- RenderMediaOnLambdaOutput} from './api/render-media-on-lambda';+ RenderMediaOnLambdaOutput,+} from './api/render-media-on-lambda';import {renderMediaOnLambda,renderVideoOnLambda,} from './api/render-media-on-lambda';import type {RenderStillOnLambdaInput,- RenderStillOnLambdaOutput} from './api/render-still-on-lambda';-import {- renderStillOnLambda+ RenderStillOnLambdaOutput,} from './api/render-still-on-lambda';+import {renderStillOnLambda} from './api/render-still-on-lambda';import type {LambdaLSInput, LambdaLsReturnType} from './functions/helpers/io';import {LambdaInternals} from './internals';import type {AwsRegion} from './pricing/aws-regions';+import type {CustomS3Credentials} from './shared/aws-clients';import type {RenderProgress} from './shared/constants';import type {LambdaArchitecture} from './shared/validate-architecture';@@ -130,4 +118,5 @@ export type {GetAwsClientInput,GetAwsClientOutput,LambdaArchitecture,+ CustomS3Credentials,};diff --git a/packages/lambda/src/shared/aws-clients.ts b/packages/lambda/src/shared/aws-clients.tsindex 59d0faec89..3a4d0e1de2 100644--- a/packages/lambda/src/shared/aws-clients.ts+++ b/packages/lambda/src/shared/aws-clients.ts@@ -53,7 +53,7 @@ const getKey = ({}: {credentials: CredentialPair | null;region: AwsRegion;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;service: keyof ServiceMapping;}) =>[@@ -78,7 +78,7 @@ export type CustomCredentialsWithoutSensitiveData = {endpoint: string;};-export type CustomCredentials = CustomCredentialsWithoutSensitiveData & {+export type CustomS3Credentials = CustomCredentialsWithoutSensitiveData & {accessKeyId: string | null;secretAccessKey: string | null;};@@ -90,7 +90,7 @@ export const getServiceClient = <T extends keyof ServiceMapping>({}: {region: AwsRegion;service: T;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;}): ServiceMapping[T] => {const Client = (() => {if (service === 'cloudwatch') {@@ -161,7 +161,7 @@ export const getCloudWatchLogsClient = (export const getS3Client = (region: AwsRegion,- customCredentials: CustomCredentials | null+ customCredentials: CustomS3Credentials | null): S3Client => {return getServiceClient({region, service: 's3', customCredentials});};@@ -180,7 +180,7 @@ export const getIamClient = (region: AwsRegion): IAMClient => {export const getServiceQuotasClient = (region: AwsRegion,- customCredentials: CustomCredentials | null+ customCredentials: CustomS3Credentials | null): ServiceQuotasClient => {return getServiceClient({region,diff --git a/packages/lambda/src/shared/constants.ts b/packages/lambda/src/shared/constants.tsindex 4d73f2f1ae..7073a71aad 100644--- a/packages/lambda/src/shared/constants.ts+++ b/packages/lambda/src/shared/constants.ts@@ -12,8 +12,8 @@ import type {ChunkRetry} from '../functions/helpers/get-retry-stats';import type {EnhancedErrorInfo} from '../functions/helpers/write-lambda-error';import type {AwsRegion} from '../pricing/aws-regions';import type {- CustomCredentials,CustomCredentialsWithoutSensitiveData,+ CustomS3Credentials,} from './aws-clients';import type {DownloadBehavior} from './content-disposition-header';import type {ExpensiveChunk} from './get-most-expensive-chunks';@@ -132,7 +132,7 @@ export type OutNameInput =| {bucketName: string;key: string;- customS3Implementation?: CustomCredentials;+ customS3Implementation?: CustomS3Credentials;};export type OutNameInputWithoutCredentials =@@ -146,7 +146,7 @@ export type OutNameInputWithoutCredentials =export type OutNameOutput = {renderBucketName: string;key: string;- customCredentials: CustomCredentials | null;+ customCredentials: CustomS3Credentials | null;};export const optimizationProfile = (siteId: string, compositionId: string) =>@@ -260,7 +260,7 @@ export type LambdaPayloads = {bucketName: string;renderId: string;version: string;- customS3Implementation?: CustomCredentials;+ customS3Implementation?: CustomS3Credentials;};renderer: {concurrencyPerLambda: number;