{"record":{"id":"ee8ebc346b746987","repo":"remotion-dev/remotion","slug":"lambda-was-created-but-has-no-name","errorCode":null,"errorMessage":"Lambda was created but has no name","messagePattern":"Lambda was created but has no name","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"packages/lambda/src/api/deploy-function.ts","lineNumber":111,"sourceCode":"\t\taccountId,\n\t\tmemorySizeInMb: params.memorySizeInMb,\n\t\ttimeoutInSeconds: params.timeoutInSeconds,\n\t\tretentionInDays:\n\t\t\tparams.cloudWatchLogRetentionPeriodInDays ??\n\t\t\tLambdaClientInternals.DEFAULT_CLOUDWATCH_RETENTION_PERIOD,\n\t\talreadyCreated: Boolean(alreadyDeployed),\n\t\tephemerealStorageInMb: params.diskSizeInMb,\n\t\tcustomRoleArn: params.customRoleArn as string,\n\t\tenableLambdaInsights: params.enableLambdaInsights ?? false,\n\t\tlogLevel: params.logLevel,\n\t\tvpcSubnetIds: params.vpcSubnetIds as string,\n\t\tvpcSecurityGroupIds: params.vpcSecurityGroupIds as string,\n\t\truntimePreference: params.runtimePreference,\n\t\trequestHandler: null,\n\t});\n\n\tif (!created.FunctionName) {\n\t\tthrow new Error('Lambda was created but has no name');\n\t}\n\n\treturn {\n\t\tfunctionName: created.FunctionName,\n\t\talreadyExisted: Boolean(alreadyDeployed),\n\t};\n};\n\nconst errorHandled = wrapWithErrorHandling(internalDeployFunction);\n\n/*\n * @description Creates an AWS Lambda function in your account that will be able to render a video in the cloud.\n * @see [Documentation](https://remotion.dev/docs/lambda/deployfunction)\n */\nexport const deployFunction = ({\n\tcreateCloudWatchLogGroup,\n\tmemorySizeInMb,\n\tregion,","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda/src/api/deploy-function.ts#L93-L129","documentation":"After createFunction() returns from AWS, deployFunction() checks that the response contains a FunctionName. If AWS returned a CreateFunction response with no FunctionName field, Remotion throws this error. This is a defensive guard against an unexpected/incomplete AWS API response and is not caused by user misconfiguration — it typically indicates an SDK version mismatch or an AWS-side anomaly.","triggerScenarios":"The internal createFunction() call succeeds (no AWS exception thrown) but the returned object has a falsy FunctionName. This can happen if the AWS SDK returns an unexpected shape, or if a future CreateFunction API change omits the field.","commonSituations":"AWS SDK version incompatibility where the response object shape differs from what Remotion expects; extremely rare AWS-side issues; using a mock or stubbed Lambda client in tests that does not populate FunctionName.","solutions":["Retry the deployFunction() call — transient AWS anomalies can occasionally produce malformed responses.","Ensure your @remotion/lambda and AWS SDK versions are compatible and up to date.","If this persists, inspect the raw AWS CreateFunction response by enabling verbose logging and report it as a Remotion issue.","If testing with a mocked Lambda client, make sure the mock returns a CreateFunctionCommand output with a populated FunctionName field."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"async function deployWithRetry(params: DeployFunctionInput, maxRetries = 2): Promise<string> {\n  for (let attempt = 0; attempt <= maxRetries; attempt++) {\n    try {\n      const {functionName} = await deployFunction(params);\n      return functionName;\n    } catch (err) {\n      if (\n        err instanceof Error &&\n        err.message.includes('Lambda was created but has no name') &&\n        attempt < maxRetries\n      ) {\n        continue;\n      }\n      throw err;\n    }\n  }\n  throw new Error('Unreachable');\n}","preventionTips":["Keep @remotion/lambda and AWS SDK versions current to avoid response-shape mismatches.","Wrap deployFunction() in a retry loop for transient AWS anomalies.","When mocking the Lambda client in tests, ensure the mock returns a populated FunctionName."],"tags":["lambda","aws","deployment","internal","unexpected-response"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}