remotion-dev/remotion · error · RemotionException
You have multiple buckets ({', '.join(buckets)}) in your S3
Error message
You have multiple buckets ({', '.join(buckets)}) in your S3 region ({self.region}) starting with "remotionlambda-". Please see https://remotion.dev/docs/lambda/multiple-buckets. What it means
Raised when the AWS account has more than one S3 bucket whose name starts with 'remotionlambda-' in the configured region. Remotion Lambda expects exactly one such bucket to manage renders and input props; ambiguity prevents it from choosing the correct one safely.
Source
Thrown at packages/lambda-python/remotion_lambda/remotionclient.py:330
)
except ClientError as e:
logger.debug(
"Could not get bucket location for %s (possibly permission issue): %s",
bucket_name,
e,
)
raise e
except ParamValidationError as e:
raise RemotionInvalidArgumentException(
f"Invalid S3 client parameters for get_bucket_location: {e}"
) from e
def _get_or_create_bucket(self) -> str:
"""Get existing bucket or create a new one following JS SDK logic."""
buckets = self._get_remotion_buckets()
if len(buckets) > 1:
raise RemotionException(
f"You have multiple buckets ({', '.join(buckets)}) in your S3 region "
f"({self.region}) starting with \"remotionlambda-\". "
"Please see https://remotion.dev/docs/lambda/multiple-buckets."
)
if len(buckets) == 1:
return buckets[0]
bucket_name = self._make_bucket_name()
s3_client = self._create_s3_client()
try:
if self.region == REGION_US_EAST:
s3_client.create_bucket(Bucket=bucket_name)
else:
s3_client.create_bucket(
Bucket=bucket_name,
CreateBucketConfiguration={'LocationConstraint': self.region},View on GitHub (pinned to 78fe4bb3fd)
Solutions
- List the buckets: `aws s3api list-buckets --query 'Buckets[?starts_with(Name,`remotionlambda-`)]'`, then delete the obsolete ones.
- Keep a single bucket per region; if you need isolation, use separate AWS accounts or regions.
- Follow the guidance at https://remotion.dev/docs/lambda/multiple-buckets to consolidate.
- After cleanup, retry the render; the client will reuse the single remaining bucket.
Example fix
// before (multiple buckets exist) # aws s3 ls | grep remotionlambda- # remotionlambda-aaa-us-east-1 # remotionlambda-bbb-us-east-1 # after aws s3 rb s3://remotionlambda-bbb-us-east-1 --force # retry render - client now finds exactly one bucket
Defensive patterns
Strategy: validation
Validate before calling
def ensure_single_remotion_bucket(session, region: str) -> str:
s3 = session.client('s3', region_name=region)
buckets = [b['Name'] for b in s3.list_buckets()['Buckets']
if b['Name'].startswith('remotionlambda-')]
if len(buckets) > 1:
raise RuntimeError(f'Multiple buckets: {buckets}. Delete all but one.')
return buckets[0] if buckets else '' Try / catch
try:\n client.render_media(...)\nexcept RemotionException as e:\n if 'multiple buckets' in str(e).lower():\n # run cleanup then retry\n cleanup_extra_buckets()\n client.render_media(...)
Prevention
- Use one remotionlambda- bucket per region per account.
- Clean up buckets created by CI after each run.
- Use separate AWS accounts for isolating environments.
When it happens
Trigger: Running renders after a previous deployment or test created an extra remunctionlambda- bucket; deploying Remotion Lambda across multiple stacks in the same account/region; manual bucket creation; leftover buckets from deleted CloudFormation stacks.
Common situations: CI runs that create buckets and never clean them up; multiple developers deploying into a shared AWS account; switching deploy versions that changed the bucket naming; cross-stack contamination.
Related errors
- Deploying the site failed, and removing the generated bundle
- Lambda Insights is not supported by AWS in region ${region}.
- Lambda was created but has no name
- No bucket with the name ${bucketName} exists
- `throwIfSiteExists` was passed as true, but there are alread
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/d9a30b4647c8920f.
Report an issue: GitHub.