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

  1. 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.
  2. Follow https://remotion.dev/docs/lambda/multiple-buckets.
  3. Pre-create exactly one bucket and reference it explicitly so future deploys do not create duplicates.
  4. 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

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


AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12). Data as JSON: /api/errors/4e36caeae178e2b6. Report an issue: GitHub.