Skip to content

Commit

Permalink
Update render-media-on-lambda.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
JonnyBurger committed Feb 13, 2025
1 parent 6d9b7a0 commit a374e5a
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions packages/example/render-media-on-lambda.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,21 @@
/* eslint-disable no-undef */
import {deployFunction} from '@remotion/lambda';
import {
getRenderProgress,
renderMediaOnLambda,
speculateFunctionName,
} from '@remotion/lambda/client';
} from '@remotion/lambda-client';
import dotenv from 'dotenv';
dotenv.config();

await deployFunction({
memorySizeInMb: 2048,
diskSizeInMb: 2048,
region: 'eu-central-1',
timeoutInSeconds: 120,
createCloudWatchLogGroup: true,
});

const functionName = speculateFunctionName({
diskSizeInMb: 2048,
memorySizeInMb: 2048,
Expand All @@ -24,15 +33,13 @@ const {bucketName, renderId, cloudWatchMainLogs} = await renderMediaOnLambda({
bucketName: 'remotion-test-bucket',
key: 'out.mp4',
s3OutputProvider: {
// TODO: Use the endpoint from your Supabase Storage settings
endpoint: 'https://kudbuxgvpedqabsivqjz.supabase.co/storage/v1/s3',
// TODO: Use the Access Key from your Supabase Storage settings
accessKeyId: process.env.SUPABASE_ACCESS_KEY_ID ?? '',
// TODO: Use the Secret Access Key from your Supabase Storage settings
secretAccessKey: process.env.SUPABASE_SECRET_ACCESS_KEY ?? '',
// TODO: Use the region from your Supabase Storage settings
region: 'eu-central-1',
forcePathStyle: true,
// FIXME: Use the endpoint from your Cloudflare Storage settings
endpoint:
'https://2fe488b3b0f4deee223aef7464784c46.r2.cloudflarestorage.com',
// FIXME: Use the Access Key from your Cloudflare settings
accessKeyId: process.env.R2_ACCESS_KEY_ID ?? '',
// FIXME: Use the Secret Access Key from your Cloudflare settings
secretAccessKey: process.env.R2_SECRET_ACCESS_KEY ?? '',
},
},
});
Expand Down

0 comments on commit a374e5a

Please sign in to comment.