{"record":{"id":"2366ecd289f02e4a","repo":"remotion-dev/remotion","slug":"the-provider-does-not-support-conditional-output-u","errorCode":null,"errorMessage":"The provider does not support conditional output uploads","messagePattern":"The provider does not support conditional output uploads","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/serverless/src/finish-render.ts","lineNumber":84,"sourceCode":"\t);\n\n\tconst writeOptions: WriteFileInput<Provider> = {\n\t\tbucketName: renderBucketName,\n\t\tkey,\n\t\tbody: fs.createReadStream(outputFile),\n\t\tregion: insideFunctionSpecifics.getCurrentRegionInFunction(),\n\t\tprivacy,\n\t\texpectedBucketOwner,\n\t\tdownloadBehavior,\n\t\tcustomCredentials,\n\t\tforcePathStyle,\n\t\tstorageClass,\n\t\trequestHandler,\n\t};\n\n\tif (renderMetadata.outputFileIsConditional) {\n\t\tif (!providerSpecifics.writeFileIfNotExists) {\n\t\t\tthrow new Error(\n\t\t\t\t'The provider does not support conditional output uploads',\n\t\t\t);\n\t\t}\n\n\t\tawait providerSpecifics.writeFileIfNotExists(writeOptions);\n\t} else {\n\t\tawait providerSpecifics.writeFile(writeOptions);\n\t}\n\n\twriteToBucket.end();\n\n\tconst errorExplanations = inspectErrors({\n\t\terrors: overallProgress.get().errors,\n\t});\n\n\tconst cleanupProm = cleanupProps({\n\t\tinputProps,\n\t\tserializedResolvedProps,","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/remotion-dev/remotion/blob/b2f4e34732f3c6c222ea029413e22dc402218cd7/packages/serverless/src/finish-render.ts#L66-L102","documentation":"finishRender uploads the render output via providerSpecifics.writeFileIfNotExists when renderMetadata.outputFileIsConditional is set (conditional upload: fail if output already exists). If the active provider does not implement writeFileIfNotExists, conditional output uploads cannot be honored and the library throws this error instead of silently doing an unconditional upload.","triggerScenarios":"A render whose metadata marks the output file as conditional (renderMediaOnLambda with conditional/ifNotExists output) being finished by a provider plugin that does not export writeFileIfNotExists in its providerSpecifics.","commonSituations":"Using a custom or third-party serverless provider (non-AWS) that lacks conditional-write support while the render was started with conditional output enabled; mixing render metadata from one provider with another provider's finish step.","solutions":["Start the render without the conditional output (ifNotExists) option so the regular write path is used","Use the AWS Lambda provider, which implements writeFileIfNotExists","Implement writeFileIfNotExists in your custom provider's providerSpecifics","Upgrade the provider package to a version supporting conditional uploads"],"exampleFix":"// before\nawait renderMediaOnLambda({\n  ...params,\n  outputIsIfNotExists: true,\n});\n// after\nawait renderMediaOnLambda({\n  ...params,\n  outputIsIfNotExists: false,\n});","handlingStrategy":"validation","validationCode":"if (renderMetadata.outputFileIsConditional && !providerSpecifics.writeFileIfNotExists) {\n  throw new Error('Selected provider cannot honor conditional output uploads; disable the option or switch providers.');\n}","typeGuard":"const providerSupportsConditional = (p: unknown): p is {writeFileIfNotExists: (o: unknown) => Promise<void>} => typeof (p as {writeFileIfNotExists?: unknown}).writeFileIfNotExists === 'function';","tryCatchPattern":"try {\n  await finishRender(args);\n} catch (err) {\n  if (String(err).includes('conditional output uploads')) {\n    await finishRender({...args, renderMetadata: {...args.renderMetadata, outputFileIsConditional: false}});\n  } else {\n    throw err;\n  }\n}","preventionTips":["Keep provider metadata and the finishing provider consistent (same provider start-to-finish)","Use the AWS provider when enabling conditional output uploads","Feature-detect providerSpecifics.writeFileIfNotExists before enabling the option","Pin @remotion packages to matching versions so provider capabilities align"],"tags":["serverless","provider","unsupported-operation","s3"],"backgroundTag":"unsupported-operation","analyzedSha":"b2f4e34732f3c6c222ea029413e22dc402218cd7","analyzedAt":"2026-09-09T13:27:51.281Z","contentChangedAt":"2026-09-09T13:27:51.281Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}