remotion-dev/remotion · error · error
you have multiple buckets (%s) in your S3 region (%s) starti
Error message
you have multiple buckets (%s) in your S3 region (%s) starting with %q. Please see https://remotion.dev/docs/lambda/multiple-buckets
What it means
Returned by getOrCreateBucket when more than one bucket prefixed `remotionlambda-` exists in the configured region. The Remotion Lambda runtime expects exactly one such bucket per region; with multiple, it cannot decide which to use for input props and output, so it refuses rather than guessing. The message links to the docs page for resolving the situation.
Source
Thrown at packages/lambda-go/s3.go:125
return nil, err
}
if isInRegion {
buckets = append(buckets, name)
}
}
return buckets, nil
}
// getOrCreateBucket returns the single existing Remotion bucket in the region,
// creating one if none exist. It errors if multiple candidate buckets exist.
func getOrCreateBucket(svc *s3.Client, region string) (string, error) {
buckets, err := getRemotionBuckets(svc, region)
if err != nil {
return "", err
}
if len(buckets) > 1 {
return "", fmt.Errorf(
"you have multiple buckets (%s) in your S3 region (%s) starting with %q. Please see https://remotion.dev/docs/lambda/multiple-buckets",
strings.Join(buckets, ", "), region, bucketNamePrefix,
)
}
if len(buckets) == 1 {
return buckets[0], nil
}
bucket, err := makeBucketName(region)
if err != nil {
return "", err
}
input := &s3.CreateBucketInput{Bucket: new(bucket)}
if region != regionUsEast1 {
input.CreateBucketConfiguration = &types.CreateBucketConfiguration{
LocationConstraint: types.BucketLocationConstraint(region),
}
}View on GitHub (pinned to 78fe4bb3fd)
Solutions
- List buckets: `aws s3api list-buckets --query 'Buckets[?starts_with(Name,\`remotionlambda-\`)].Name'`, identify the one in use, and delete the other(s) after confirming they hold no needed renders.
- Follow https://remotion.dev/docs/lambda/multiple-buckets for the official resolution steps.
- Set an explicit bucket name in your config if the library supports it, so creation is deterministic and you can clean up the duplicates.
- Audit who/what creates buckets in the account to prevent parallel deploys from creating a second bucket.
Defensive patterns
Strategy: validation
Validate before calling
// Preflight: ensure at most one Remotion bucket exists.
func ensureSingleBucket(svc *s3.Client, region string) (string, error) {
buckets, err := getRemotionBuckets(svc, region)
if err != nil { return "", err }
if len(buckets) > 1 {
return "", fmt.Errorf("multiple buckets preflight: %s - clean up before render", strings.Join(buckets, ", "))
}
return getOrCreateBucket(svc, region)
} Prevention
- Run `aws s3api list-buckets` after each deploy to catch duplicate buckets early.
- Restrict who can create `remotionlambda-` buckets to a single deploy principal.
- Reference a specific bucket name in config when supported to make creation deterministic.
When it happens
Trigger: getRemotionBuckets returns 2+ entries for the region, which can happen after cross-account deployments, manual bucket creation, or two `deploy` runs that created buckets in parallel.
Common situations: An old bucket from a previous Remotion major version plus a new one created by a fresh deploy. A teammate manually created a `remotionlambda-` bucket. Deploying the same stack from multiple CI accounts into the same region.
Related errors
- could not load AWS config: %w
- could not get location of S3 bucket %q: %w
- could not list S3 buckets: %w
- failed to create bucket: %w
- You have multiple buckets (%s) in your S3 region (%s) starti
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/5ba6bf8e6bba4071.
Report an issue: GitHub.