Capítulo 467 de 988
This API exposes full access to the AWS SDK that Remotion uses under the hood. You can use it to interact with your AWS infrastructure in ways that Remotion doesn't provide a function for.
// Import from "@remotion/lambda" instead before Remotion v4.0.60
const bucketName = 'remotionlambda-d9mafgx';
const getFileAsBuffer = async () => {
const progress = await getRenderProgress({
renderId: 'd7nlc2y',
bucketName: 'remotionlambda-d9mafgx',
functionName: 'remotion-render-la8ffw',
region: 'us-east-1',
});
if (!progress.outKey) {
// Video not yet rendered
return;
}
const {client, sdk} = getAwsClient({region: 'us-east-1', service: 's3'});
const data = client.send(
new sdk.GetObjectCommand({
Bucket: bucketName,
Key: progress.outKey,
}),
);
return data.Body as Readable;
};