Chapter 471: getOrCreateBucket()
Core Idea
Creates a bucket for Remotion Lambda in your S3 account. If one already exists, it will get returned instead.
Key Concepts
- Arguments
- region
- enableFolderExpiry<AvailableFrom v="4.0.32" />
onBucketEnsured
- forcePathStyle?<AvailableFrom v="4.0.202" />
- Return value
- bucketName
- alreadyExisted<AvailableFrom v="3.3.78" />
Code Examples
const {bucketName} = await getOrCreateBucket({region: 'us-east-1'});
console.log(bucketName); // "remotionlambda-32df3p"
- What it demonstrates: Usage pattern for getOrCreateBucket() from the official docs.
Key Takeaways
- Understand arguments when working with getOrCreateBucket().
- Understand region when working with getOrCreateBucket().
- Understand enablefolderexpiry<availablefrom v="4.0.32" /> when working with getOrCreateBucket().
- Understand
onbucketensured when working with getOrCreateBucket().
- Understand forcepathstyle?<availablefrom v="4.0.202" /> when working with getOrCreateBucket().
Connects To
- api: related page in the Lambda (@remotion/lambda) section.
- Approuterwebhook: related page in the Lambda (@remotion/lambda) section.
- Authentication: related page in the Lambda (@remotion/lambda) section.