{"record":{"id":"3bb80f839b1e7db5","repo":"remotion-dev/remotion","slug":"no-bucket-with-the-name-bucketname-exists","errorCode":null,"errorMessage":"No bucket with the name ${bucketName} exists","messagePattern":"No bucket with the name (.+?) exists","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/shared/deploy-site-with-bundle.ts","lineNumber":86,"sourceCode":"\t\toptions: {\n\t\t\tmustStartWithRemotion: !options.bypassBucketNameValidation,\n\t\t},\n\t});\n\n\tvalidateSiteName(siteName);\n\tvalidatePrivacy(privacy, false);\n\n\tconst accountId = await providerSpecifics.getAccountId({region});\n\n\tconst bucketExists = await providerSpecifics.bucketExists({\n\t\tbucketName,\n\t\tregion,\n\t\texpectedBucketOwner: accountId,\n\t\tforcePathStyle,\n\t\trequestHandler,\n\t});\n\tif (!bucketExists) {\n\t\tthrow new Error(`No bucket with the name ${bucketName} exists`);\n\t}\n\n\tconst subFolder = getSitesKey(siteName);\n\n\tconst filesPromise = providerSpecifics.listObjects({\n\t\tbucketName,\n\t\texpectedBucketOwner: accountId,\n\t\tregion,\n\t\t// The `/` is important to not accidentally delete sites with the same name but containing a suffix.\n\t\tprefix: `${subFolder}/`,\n\t\tforcePathStyle,\n\t\trequestHandler,\n\t});\n\tconst bundlePromise = getBundle();\n\tconst [files, bundleDir] = await waitForPromisesToFinish([\n\t\tfilesPromise,\n\t\tbundlePromise,\n\t] as const);","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/shared/deploy-site-with-bundle.ts#L68-L104","documentation":"Thrown by deploySiteFromBundle()/deploySiteWithBundle() after it asks the S3 provider whether the named bucket exists and gets a negative answer. Remotion Lambda requires a pre-existing S3 bucket to hold the site bundle; it does not create one for you. The check is gated on the resolved AWS account ID and the expectedBucketOwner, so an ownership mismatch can also report the bucket as non-existent.","triggerScenarios":"Calling deploySiteFromBundle({bucketName, region, bundleDir}) where bucketName is misspelled, lives in a different region, belongs to a different AWS account, or was never created. Also triggered when the AWS credentials in use cannot see the bucket (permissions/owner mismatch).","commonSituations":"Forgetting to run `npx remotion lambda buckets create` first; typos in bucketName; wrong AWS profile selected; bucket created in us-east-1 but deploy targets eu-west-1; cross-account bucket where expectedBucketOwner check fails.","solutions":["Verify the bucket name spelling and run `npx remotion lambda buckets ls` (or `aws s3 ls`) to confirm the bucket exists.","Ensure the region passed to deploySiteFromBundle matches the region where the bucket was created.","Confirm the AWS credentials/profile in use own the bucket or are allowed to HeadBucket on it.","Create the bucket with `npx remotion lambda buckets create` if it does not exist."],"exampleFix":"// before\ndeploySiteFromBundle({bucketName: 'my-bukcet', region: 'us-east-1', bundleDir})\n// after\n// first: `npx remotion lambda buckets create`\ndeploySiteFromBundle({bucketName: 'my-bucket', region: 'us-east-1', bundleDir})","handlingStrategy":"validation","validationCode":"import {headBucket} from '@aws-sdk/client-s3'\n// before deploySiteFromBundle, confirm the bucket is reachable\nasync function assertBucketExists(s3, bucketName, expectedOwner) {\n  try {\n    await s3.send(new headBucket({Bucket: bucketName, ExpectedBucketOwner: expectedOwner}))\n  } catch (e) {\n    throw new Error(`Bucket '${bucketName}' not visible: ${e.message}`)\n  }\n}","typeGuard":"const isNonEmptyString = (v) => typeof v === 'string' && v.trim().length > 0","tryCatchPattern":"try {\n  await deploySiteFromBundle({bucketName, region, bundleDir})\n} catch (e) {\n  if (/No bucket with the name/.test(e.message)) {\n    // prompt user / create bucket, then retry once\n  } else throw e\n}","preventionTips":["Always create the bucket first via `npx remotion lambda buckets create` and store its name in config.","Resolve the AWS region/profile once and reuse it for both bucket creation and deploy.","Validate bucketName with a non-empty-string guard before calling deploy."],"tags":["aws","s3","deployment","configuration"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}