Faster progress polling
By default, each getRenderProgress() call invokes the render function, which reads the render progress from S3.
Set skipLambdaInvocation to true to read the progress directly from S3 instead. This reduces the latency and avoids a Lambda invocation for each progress poll. It does not make the render itself faster.
poll-progress.tsimport {getRenderProgress ,speculateFunctionName } from '@remotion/lambda/client'; constfunctionName =speculateFunctionName ({memorySizeInMb : 2048,diskSizeInMb : 2048,timeoutInSeconds : 120, }); constprogress = awaitgetRenderProgress ({renderId : 'd7nlc2y',bucketName : 'remotionlambda-useast1-abcdefgh',functionName ,region : 'us-east-1',skipLambdaInvocation : true, });
Requirements
- The function name must follow the Remotion function naming convention. Functions deployed using
deployFunction()follow this convention. - The AWS credentials calling
getRenderProgress()must haves3:GetObjectpermission for the Remotion bucket. The policy returned bygetUserPolicy()includes this permission.
If either requirement is not fulfilled, leave skipLambdaInvocation unset.