{"record":{"id":"cdd6eb6df7e7d2c8","repo":"remotion-dev/remotion","slug":"aws-did-not-return-a-runtime-version-arn","errorCode":null,"errorMessage":"AWS did not return a runtime version ARN.","messagePattern":"AWS did not return a runtime version ARN\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"warning","filePath":"packages/lambda/src/api/create-function.ts","lineNumber":342,"sourceCode":"\n\tRenderInternals.Log.verbose(\n\t\t{indent: false, logLevel},\n\t\t'Function is now ready.',\n\t);\n\n\tRenderInternals.Log.verbose(\n\t\t{indent: false, logLevel},\n\t\t'Locking the runtime version of the function...',\n\t);\n\n\tconst runtimeVersionArn =\n\t\tpartition === 'aws-cn'\n\t\t\t? currentRuntimeVersionArn\n\t\t\t: `arn:aws:lambda:${region}::runtime:58a37e8413ed69058c4ac3b1df642118591f17d40def93d6101f867c72cd03c2`;\n\n\ttry {\n\t\tif (!runtimeVersionArn) {\n\t\t\tthrow new Error('AWS did not return a runtime version ARN.');\n\t\t}\n\n\t\tawait LambdaClientInternals.getLambdaClient(\n\t\t\tregion,\n\t\t\tundefined,\n\t\t\trequestHandler,\n\t\t).send(\n\t\t\tnew PutRuntimeManagementConfigCommand({\n\t\t\t\tFunctionName,\n\t\t\t\tUpdateRuntimeOn: 'Manual',\n\t\t\t\tRuntimeVersionArn: runtimeVersionArn,\n\t\t\t}),\n\t\t);\n\n\t\tRenderInternals.Log.verbose(\n\t\t\t{indent: false, logLevel},\n\t\t\t`Function runtime is locked to ${runtimeVersionArn}`,\n\t\t);","sourceCodeStart":324,"sourceCodeEnd":360,"githubUrl":"https://github.com/remotion-dev/remotion/blob/10db9de07356446fb0edb3c3ae211369b693d18b/packages/lambda/src/api/create-function.ts#L324-L360","documentation":"After creating a function, createFunction() pins the Node runtime by calling PutRuntimeManagementConfig with a RuntimeVersionArn. For the aws-cn partition it uses the ARN returned by GetFunction; when AWS never returned one (RuntimeVersionConfig absent while state left 'Pending'), this error is thrown. Importantly, the throw sits inside a try/catch that downgrades it to a console.warn - function creation still succeeds; only runtime locking is skipped.","triggerScenarios":"Deploying a Remotion Lambda function in an aws-cn (China) partition region where GetFunction's Configuration.RuntimeVersionConfig.RuntimeVersionArn stays null, or where the AWS response lacks the runtime version field entirely (packages/lambda/src/api/create-function.ts:335-365).","commonSituations":"China-partition deployments where the runtime-version API surface differs from the global partition; older @remotion/lambda versions against changed AWS responses; IAM policies missing lambda:GetFunction details. End result is only the warning 'Could not lock the runtime version'.","solutions":["Treat it as non-fatal - the function was created; only runtime version locking was skipped (you saw the 'Could not lock the runtime version' warning)","Update @remotion/lambda to the latest version, which tracks current AWS behavior","Ensure the deploy role allows lambda:GetFunction so RuntimeVersionConfig is returned","Optionally pin the runtime manually in the AWS console (Runtime settings -> Update runtime on: Manual) if you need deterministic runtimes"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":["No action needed - @remotion/lambda already catches this and only warns; the function is created","Keep @remotion/lambda updated for current AWS response shapes","Grant lambda:GetFunction to the deploy role so RuntimeVersionArn is returned","For deterministic runtimes, pin manually via the AWS console (Runtime management -> Manual)"],"tags":["aws","lambda","runtime-version","aws-cn","china-partition","warning"],"backgroundTag":"aws-sdk-missing-response-field","analyzedSha":"10db9de07356446fb0edb3c3ae211369b693d18b","analyzedAt":"2026-08-22T21:45:17.748Z","contentChangedAt":"2026-08-22T21:45:17.748Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}