Search forkrail

Search documentation, comparisons, and CLI commands.

APIs & backends
Production ready

Deploy FastAPI on forkrail

Run ASGI FastAPI services on Python 3.12–3.14 arm64 with up to 10 concurrent requests per warm worker, zero Lambda adapter wrappers, and automatic dependency caching.

Adapter
None (native ASGI via uvicorn)
Runtime
Python 3.13 arm64 (also 3.12 & 3.14)
Detection
app.py / main.py / api/main.py or pyproject.toml
Memory
640 MB default (adjustable per project)
  • 10× concurrent ASGI
    Up to 10 concurrent requests share one warm uvicorn worker
  • Dependency formats
    pyproject.toml + uv.lock, Pipfile.lock, or requirements.txt
  • Zero wrapper code
    No Mangum or AWS Lambda handler boilerplate needed
  • Streaming & SSE
    StreamingResponse and Server-Sent Events stream end to end

1. Project layout & entrypoint

forkrail automatically locates app in app.py, index.py, server.py, main.py, or asgi.py at the project root or under src/, app/, or api/ — or specify an explicit module in pyproject.toml:

from fastapi import FastAPI
from fastapi.middleware.gzip import GZipMiddleware
app = FastAPI()
app.add_middleware(GZipMiddleware, minimum_size=1000)
@app.get('/health')
async def health():
return {'status': 'ok'}

Pin your Python version in .python-version or requires-python (3.12, 3.13, or 3.14; defaults to 3.13). Dependencies install for Linux arm64 manylinux wheels inside the builder and cache between deploys.

2. Deploy & tail logs

Deploy FastAPI and inspect live traffic
# Deploy a preview
forkrail deploy
# Ship to production
forkrail deploy --prod
# Stream requests, Python print/logging output, and outgoing HTTP calls
forkrail logs billing-api --app --follow

3. Concurrent compute & AWS connectivity

  • Async I/O shines: Because uvicorn serves up to 10 concurrent streams per Lambda worker, FastAPI endpoints waiting on Postgres, Redis, or external APIs pay for one warm worker instead of ten.
  • Need strict isolation? Set "fluid": false in vercel.json (or forkrail project billing-api --concurrent false) for one request per worker.
  • Keep startup fast: Run slow warm-up work in FastAPI lifespan background tasks rather than blocking import time.
  • Private AWS services: Assign an IAM role (--role) for boto3 without keys, or expose internal RDS/Postgres targets via --egress.
Ready to deploy your FastAPI project inside your own AWS account?
Quickstart