remotion-dev/remotion · error · Exception
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 "remotionlambda-". Please see https://remotion.dev/docs/lambda/multiple-buckets.
What it means
Thrown by PHPClient::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 pick one safely, so it aborts with a pointer to the docs. This is the PHP equivalent of the Go 1188 error.
Source
Thrown at packages/lambda-php/src/PHPClient.php:156
}
if ($this->isBucketInCurrentRegion($s3Client, $name)) {
$buckets[] = $name;
}
}
return $buckets;
}
/**
* Get existing bucket or create a new one following JS SDK logic
*/
private function getOrCreateBucket(): string
{
$buckets = $this->getRemotionBuckets();
if (count($buckets) > 1) {
throw new Exception(
sprintf(
"You have multiple buckets (%s) in your S3 region (%s) starting with \"remotionlambda-\". " .
"Please see https://remotion.dev/docs/lambda/multiple-buckets.",
implode(', ', $buckets),
$this->region
)
);
}
if (count($buckets) === 1) {
return $buckets[0];
}
$bucket = $this->makeBucketName();
$s3Client = $this->createS3Client();
try {
$params = ['Bucket' => $bucket];View on GitHub (pinned to 78fe4bb3fd)
Solutions
- List the buckets with `aws s3api list-buckets --query 'Buckets[?starts_with(Name,\`remotionlambda-\`)].Name'`, keep the one in active use, delete the rest after verifying no needed renders remain.
- Follow https://remotion.dev/docs/lambda/multiple-buckets.
- Pre-create exactly one bucket and reference it explicitly so future deploys do not create duplicates.
- Restrict IAM so only one principal can create `remotionlambda-` buckets in the account.
Defensive patterns
Strategy: validation
Validate before calling
// Preflight in PHP before render.
private function assertSingleBucket(): void {
$buckets = $this->getRemotionBuckets();
if (count($buckets) > 1) {
throw new RuntimeException('Preflight: multiple remotion buckets: ' . implode(', ', $buckets));
}
} Prevention
- Run `aws s3api list-buckets` after each deploy to detect duplicates early.
- Restrict `remotionlambda-` bucket creation to a single deploy principal.
- Reference a specific bucket in config to make creation deterministic.
When it happens
Trigger: getRemotionBuckets() returns 2+ bucket names for $this->region, e.g. after parallel deploys, cross-account deploys into the same region, or manual bucket creation.
Common situations: Old bucket from a previous Remotion version lingering alongside a newly deployed one. A teammate created a `remotionlambda-` bucket by hand. Multiple CI accounts deploying into the same region.
Related errors
- you have multiple buckets (%s) in your S3 region (%s) starti
- Failed to create bucket: {$exception->getMessage()}
- Failed to upload to S3: {$exception->getMessage()}
- could not load AWS config: %w
- could not get location of S3 bucket %q: %w
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/4e36caeae178e2b6.
Report an issue: GitHub.