remotion-dev/remotion · error · Exception
REMOTION_APP_REGION is not set
Error message
REMOTION_APP_REGION is not set
What it means
Raised by testclient_render_still.py when REMOTION_APP_REGION is unset after dotenv loading. Same guard as the render-media example: the still-render client cannot construct boto3 clients without an AWS region.
Source
Thrown at packages/lambda-python/testclient_render_still.py:13
import os
from remotion_lambda import RenderStillParams, Privacy, ValidStillImageFormats
from remotion_lambda import RemotionClient
from dotenv import load_dotenv
load_dotenv()
# Load env variables
REMOTION_APP_REGION = os.getenv('REMOTION_APP_REGION')
if not REMOTION_APP_REGION:
raise Exception("REMOTION_APP_REGION is not set")
REMOTION_APP_FUNCTION_NAME = os.getenv('REMOTION_APP_FUNCTION_NAME')
if not REMOTION_APP_FUNCTION_NAME:
raise Exception("REMOTION_APP_FUNCTION_NAME is not set")
REMOTION_APP_SERVE_URL = os.getenv('REMOTION_APP_SERVE_URL')
if not REMOTION_APP_SERVE_URL:
raise Exception("REMOTION_APP_SERVE_URL is not set")
# Construct client
client = RemotionClient(region=REMOTION_APP_REGION,
serve_url=REMOTION_APP_SERVE_URL,
function_name=REMOTION_APP_FUNCTION_NAME)
# Set render still request
render_params = RenderStillParams(
composition="still-helloworld",
privacy=Privacy.PUBLIC,View on GitHub (pinned to 78fe4bb3fd)
Solutions
- Set REMOTION_APP_REGION in packages/lambda-python/.env (e.g. 'us-east-1').
- Run the still example from packages/lambda-python so .env resolves.
- Export inline: `REMOTION_APP_REGION=us-east-1 python testclient_render_still.py`.
- Copy .env.example to .env and fill all three REMOTION_APP_* values.
Example fix
// before REMOTION_APP_REGION= // after REMOTION_APP_REGION=us-east-1
Defensive patterns
Strategy: validation
Validate before calling
import os
from dotenv import load_dotenv
load_dotenv()
if not os.getenv('REMOTION_APP_REGION'):
raise SystemExit('REMOTION_APP_REGION is not set') Type guard
def has_region(v): return isinstance(v, str) and v.strip() != ''
Try / catch
try:
assert os.getenv('REMOTION_APP_REGION')
except AssertionError:
print('REMOTION_APP_REGION is not set'); sys.exit(1) Prevention
- Keep a single .env with all REMOTION_APP_* values for both example scripts.
- Run example scripts from packages/lambda-python.
- Validate env up front to fail fast.
- Re-use the same region across function and site.
When it happens
Trigger: Running `python testclient_render_still.py` without REMOTION_APP_REGION in .env, or running from a directory where load_dotenv() does not find the file.
Common situations: Missing/blank .env in packages/lambda-python; renamed env var; CI with stripped environment.
Related errors
- REMOTION_APP_FUNCTION_NAME is not set
- REMOTION_APP_SERVE_URL is not set
- REMOTION_APP_REGION is not set
- REMOTION_APP_FUNCTION_NAME is not set
- REMOTION_APP_SERVE_URL is not set
AI-assisted analysis of remotion-dev/remotion@78fe4bb3fd (2026-08-12).
Data as JSON: /api/errors/beaf87ed872f5afe.
Report an issue: GitHub.