{"record":{"id":"ecbee37d27ec6b91","repo":"remotion-dev/remotion","slug":"pass-force-bucket-name-when-using-s3-output-prov","errorCode":null,"errorMessage":"Pass --force-bucket-name when using S3 output provider flags.","messagePattern":"Pass --force-bucket-name when using S3 output provider flags\\.","errorType":"validation","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/cli/helpers/get-s3-output-provider-from-cli.ts","lineNumber":63,"sourceCode":"\t\tforcePathStyle,\n\t};\n};\n\nexport const makeOutNameWithCustomCredentials = ({\n\tbucketName,\n\tkey,\n\ts3OutputProvider,\n}: {\n\tbucketName: string | undefined;\n\tkey: string | undefined;\n\ts3OutputProvider: CustomCredentials<AwsProvider> | null;\n}): OutNameInput<AwsProvider> | null => {\n\tif (!s3OutputProvider) {\n\t\treturn key ?? null;\n\t}\n\n\tif (!bucketName) {\n\t\tthrow new Error(\n\t\t\t'Pass --force-bucket-name when using S3 output provider flags.',\n\t\t);\n\t}\n\n\tif (!key) {\n\t\tthrow new Error('Pass --out-name when using S3 output provider flags.');\n\t}\n\n\treturn {\n\t\tbucketName,\n\t\tkey,\n\t\ts3OutputProvider,\n\t};\n};\n","sourceCodeStart":45,"sourceCodeEnd":78,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/cli/helpers/get-s3-output-provider-from-cli.ts#L45-L78","documentation":"The makeOutNameWithCustomCredentials() helper validates that when an S3 output provider is configured (from CLI flags), a forced bucket name must be supplied via --force-bucket-name. When using a custom S3-compatible output, Remotion cannot auto-generate a bucket name, so the user must specify exactly which bucket to write to.","triggerScenarios":"Running a Lambda CLI command with S3 output provider flags (endpoint, region, force-path-style) but without --force-bucket-name. Since s3OutputProvider is non-null, the function requires bucketName to be set.","commonSituations":"User sets up a custom S3 output endpoint but forgets to specify the target bucket; user expects Remotion to create or pick a bucket on the custom endpoint automatically.","solutions":["Add the --force-bucket-name=<your-bucket> flag when using S3 output provider flags.","Ensure the bucket exists on the custom S3 endpoint and is writable with the provided credentials.","Remove all S3 output provider flags if you want Remotion to manage buckets on its own (default S3 behavior)."],"exampleFix":"# before\nnpx remotion lambda render MyComp \\\n  --s3-output-provider-endpoint=https://s3.example.com \\\n  --out-name=output.mp4\n\n# after\nnpx remotion lambda render MyComp \\\n  --s3-output-provider-endpoint=https://s3.example.com \\\n  --force-bucket-name=my-render-bucket \\\n  --out-name=output.mp4","handlingStrategy":"validation","validationCode":"function validateS3OutputProviderBucketName(opts: {\n  s3OutputProvider: unknown;\n  bucketName?: string;\n}): void {\n  if (opts.s3OutputProvider && !opts.bucketName) {\n    throw new Error('--force-bucket-name is required when using S3 output provider flags.');\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass --force-bucket-name when configuring a custom S3 output provider.","Ensure the bucket exists and is writable on the custom endpoint before rendering.","Keep a checklist of required S3 output provider flags in your render command template."],"tags":["lambda","cli","s3","output-provider","configuration","validation"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}