{"record":{"id":"5ed95886c16a30a3","repo":"remotion-dev/remotion","slug":"pass-s3-output-provider-endpoint-when-using-s3-o","errorCode":null,"errorMessage":"Pass --s3-output-provider-endpoint when using S3 output provider flags.","messagePattern":"Pass --s3-output-provider-endpoint 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":29,"sourceCode":"\tendpoint,\n\tregion,\n\tforcePathStyle,\n}: {\n\tendpoint: string | undefined;\n\tregion: AwsProvider['region'] | (string & {}) | undefined;\n\tforcePathStyle: boolean | undefined;\n}): CustomCredentials<AwsProvider> | null => {\n\tconst hasAnyS3OutputProviderFlag =\n\t\tendpoint !== undefined ||\n\t\tregion !== undefined ||\n\t\tforcePathStyle !== undefined;\n\n\tif (!hasAnyS3OutputProviderFlag) {\n\t\treturn null;\n\t}\n\n\tif (!endpoint) {\n\t\tthrow new Error(\n\t\t\t'Pass --s3-output-provider-endpoint when using S3 output provider flags.',\n\t\t);\n\t}\n\n\treturn {\n\t\tendpoint,\n\t\taccessKeyId:\n\t\t\tLambdaClientInternals.getEnvVariable(\n\t\t\t\tS3_OUTPUT_PROVIDER_ACCESS_KEY_ID_ENV_NAME,\n\t\t\t) ?? null,\n\t\tsecretAccessKey:\n\t\t\tLambdaClientInternals.getEnvVariable(\n\t\t\t\tS3_OUTPUT_PROVIDER_SECRET_ACCESS_KEY_ENV_NAME,\n\t\t\t) ?? null,\n\t\tregion,\n\t\tforcePathStyle,\n\t};\n};","sourceCodeStart":11,"sourceCodeEnd":47,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/cli/helpers/get-s3-output-provider-from-cli.ts#L11-L47","documentation":"The getS3OutputProviderFromCli() helper in the Lambda CLI validates that when any S3 output provider flag (--s3-output-provider-region, --s3-output-provider-force-path-style, or --s3-output-provider-endpoint) is passed, the endpoint flag is also provided. The endpoint is the S3-compatible API URL (required), while region and forcePathStyle are optional modifiers. Without an endpoint, the other flags have nothing to apply to.","triggerScenarios":"Running a Lambda CLI command with --s3-output-provider-region or --s3-output-provider-force-path-style but without --s3-output-provider-endpoint. The function checks that at least one S3 flag is present, then requires the endpoint to be non-empty.","commonSituations":"User passes only --s3-output-provider-region=<region> expecting it to use a default endpoint; user forgets the endpoint flag when configuring a custom S3-compatible output destination (MinIO, Backblaze B2, Wasabi, etc.).","solutions":["Add the --s3-output-provider-endpoint=<url> flag, e.g. --s3-output-provider-endpoint=https://s3.example.com.","Remove all S3 output provider flags if you do not need a custom S3-compatible output destination.","Double-check the flag names against the Lambda CLI documentation to ensure all required flags are present."],"exampleFix":"# before\nnpx remotion lambda render MyComp \\\n  --s3-output-provider-region=us-east-1 \\\n  --s3-output-provider-force-path-style\n\n# after\nnpx remotion lambda render MyComp \\\n  --s3-output-provider-endpoint=https://s3.example.com \\\n  --s3-output-provider-region=us-east-1 \\\n  --s3-output-provider-force-path-style","handlingStrategy":"validation","validationCode":"function validateS3OutputProviderFlags(opts: {\n  endpoint?: string;\n  region?: string;\n  forcePathStyle?: boolean;\n}): void {\n  const hasAny = opts.endpoint !== undefined || opts.region !== undefined || opts.forcePathStyle !== undefined;\n  if (hasAny && !opts.endpoint) {\n    throw new Error('--s3-output-provider-endpoint is required when using any S3 output provider flag.');\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always include --s3-output-provider-endpoint when using any --s3-output-provider-* flag.","Remove all S3 output provider flags if you do not need a custom S3 destination.","Document the required flag combinations for custom S3 output in your team's render scripts."],"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"}