Capítulo 471 de 988

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

  1. Understand arguments when working with getOrCreateBucket().
  2. Understand region when working with getOrCreateBucket().
  3. Understand enablefolderexpiry<availablefrom v="4.0.32" /> when working with getOrCreateBucket().
  4. Understand onbucketensured when working with getOrCreateBucket().
  5. 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.