{"record":{"id":"c19b452e502ad402","repo":"remotion-dev/remotion","slug":"remotion-app-function-name-is-not-set","errorCode":null,"errorMessage":"REMOTION_APP_FUNCTION_NAME is not set","messagePattern":"REMOTION_APP_FUNCTION_NAME is not set","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"packages/lambda-python/testclient_render_media.py","lineNumber":18,"sourceCode":"\nfrom remotion_lambda import RenderMediaParams, Privacy, ValidStillImageFormats, Webhook\nfrom remotion_lambda import RemotionClient\nimport os\nfrom dotenv import load_dotenv\nimport boto3\nfrom botocore.config import Config\n\nload_dotenv()\n\n# Load env variables\nREMOTION_APP_REGION = os.getenv('REMOTION_APP_REGION')\nif not REMOTION_APP_REGION:\n    raise Exception(\"REMOTION_APP_REGION is not set\")\n\nREMOTION_APP_FUNCTION_NAME = os.getenv('REMOTION_APP_FUNCTION_NAME')\nif not REMOTION_APP_FUNCTION_NAME:\n    raise Exception(\"REMOTION_APP_FUNCTION_NAME is not set\")\n\nREMOTION_APP_SERVE_URL = os.getenv('REMOTION_APP_SERVE_URL')\nif not REMOTION_APP_SERVE_URL:\n    raise Exception(\"REMOTION_APP_SERVE_URL is not set\")\n\n\n# --- NEW: Create a custom botocore Config for timeouts ---\n# This configuration will apply to both S3 and Lambda clients created by RemotionClient\n# if passed via the botocore_config parameter.\ncustom_botocore_config = Config(\n    connect_timeout=30,  # Max 30 seconds to establish a connection\n    read_timeout=60,     # Max 60 seconds to receive data after connection\n    retries={'max_attempts': 3, 'mode': 'adaptive'}, # Retry up to 3 times on certain errors\n    # You can add more settings here, e.g., proxies\n    # proxies={\n    #     'http': 'http://proxy.example.com:8080',\n    #     'https': 'https://proxy.example.com:8080'\n# }","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/remotion-dev/remotion/blob/78fe4bb3fdb5a2cd68724393d63cb223db333fa7/packages/lambda-python/testclient_render_media.py#L1-L36","documentation":"Raised by testclient_render_media.py when REMOTION_APP_FUNCTION_NAME is unset. The example client needs the deployed Lambda function name (the renderer you deployed via `npx remotion lambda functions deploy`) to invoke renders.","triggerScenarios":"Running the example render-media script before deploying a Lambda function, or with the function-name env var blank. The RemotionClient constructor requires function_name for every Lambda invocation.","commonSituations":"New AWS account where no function was deployed; typo in the env var name; deploying in a different region than REMOTION_APP_REGION so the function lookup later fails.","solutions":["Deploy a renderer: `npx remotion lambda functions deploy` and copy the returned function name.","Add `REMOTION_APP_FUNCTION_NAME=<name>` to packages/lambda-python/.env.","Make sure the function exists in REMOTION_APP_REGION (`npx remotion lambda functions ls`).","Re-run from the package directory so .env is loaded."],"exampleFix":"// before\nREMOTION_APP_FUNCTION_NAME=\n// after\nREMOTION_APP_FUNCTION_NAME=remotion-render-3-3-123-memo64\nREMOTION_APP_REGION=us-east-1","handlingStrategy":"validation","validationCode":"import os\nfn = os.getenv('REMOTION_APP_FUNCTION_NAME')\nif not fn:\n    raise SystemExit('REMOTION_APP_FUNCTION_NAME is not set. Run: npx remotion lambda functions deploy')","typeGuard":"def is_non_empty_str(v): return isinstance(v, str) and len(v) > 0","tryCatchPattern":"try:\n    assert os.getenv('REMOTION_APP_FUNCTION_NAME'), 'REMOTION_APP_FUNCTION_NAME is not set'\nexcept AssertionError:\n    sys.exit(2)","preventionTips":["Deploy the Lambda function with `npx remotion lambda functions deploy` and capture the name.","Verify with `npx remotion lambda functions ls`.","Keep the function name in version-controlled .env.example as a placeholder.","Ensure the function is in REMOTION_APP_REGION."],"tags":["python","lambda","configuration","environment","example"],"backgroundTag":null,"analyzedSha":"78fe4bb3fdb5a2cd68724393d63cb223db333fa7","analyzedAt":"2026-08-12T17:18:50.444Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}