Deploy Python (FastAPI · Flask · Django) to AWS in 5 minutes.
Push a Python repo from GitHub. Lander provisions a per-customer Fargate task with your container behind an HTTPS subdomain. Works with FastAPI, Flask, Django, Litestar, and any ASGI/WSGI app.[walkthrough · 5 minutes]
01
FastAPI / Litestar use uvicorn or hypercorn. Flask / Django use gunicorn. Match the CMD line to your framework. Lander injects a $PORT env var; the app must listen on it (default 80).Add a Dockerfile
# Dockerfile — FastAPI example FROM python:3.12-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . ENV PORT=80 EXPOSE 80 CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "80"]
02
Pin your versions. Lander caches the pip install layer between builds, so subsequent deploys are fast.requirements.txt
fastapi==0.115.0 uvicorn[standard]==0.32.0
03
lander.host/onboard → Google → Hobby plan ($25/mo) for 1 dynamic Fargate site, or Pro ($75/mo) for in-app Claude builder. Install the GitHub App, pick the Python repo.Sign up + connect repo
04
CodeBuild handles `docker build` for you. ~3 minutes for a typical FastAPI app. New code on every git push to the default branch.Push to deploy
05
Lander provisions an RDS Postgres per environment if you set `LANDER_NEEDS_DB=1` in env vars. Connection string is exposed as DATABASE_URL.Add a Postgres database (optional)
[why · lander vs vercel · railway · render]
- →Per-customer Fargate task with isolated VPC. No shared runtime that can OOM-kill your worker.
- →CodeBuild caching makes Python deploys fast (~3 min) vs. full container rebuilds elsewhere.
- →AI Bug Hunter scans every deploy for OWASP issues + missing security headers.
[gotchas]
- ·Set --host=0.0.0.0 in your CMD or the ALB health check fails.
- ·Use --workers $((CORES * 2 + 1)) for gunicorn; the default is single-threaded and limits throughput.
- ·Django requires SECRET_KEY in env vars; set it in Lander's env-var panel before first deploy.
- ·If your app uses SQLite locally, switch to Postgres for prod — Fargate task storage is ephemeral.
[other stacks · same flow]