Skip to main content

How It Works

deployless is a compiler. It reads your Flask project, extracts configuration metadata, and generates AWS SAM infrastructure.

Mental model​

app/features/users/routes.py   →   UsersFunction (Lambda)
app/features/auth/routes.py → AuthFunction (Lambda)
app/features/tenant/routes.py → TenantFunction (Lambda)

Each feature lives in its own Lambda. If a specific endpoint needs a different configuration (more memory, longer timeout), you can split it into its own Lambda with @dpl.route().

Compilation flow​

deployless build
│
├── 1. Reads deployless.yaml
├── 2. Discovers app/features/*/routes.py
├── 3. Imports each routes.py (extracts Blueprints and routes)
├── 4. Reads metadata from dpl.configure(), @dpl.cron(), @dpl.route()
├── 5. Validates (memory, timeout, duplicate routes, schedules, etc.)
├── 6. Generates .dist/{Feature}Function/ for each Lambda
└── 7. Writes template.yaml

What it generates​

  • A template.yaml for AWS SAM with one Lambda function per feature (and optionally one per specific route)
  • A .dist/ folder with the packaged code for each Lambda, including an auto-generated bootstrap.py and a merged requirements.txt
  • CloudWatch Log Groups with configurable retention for each function
  • IAM policies auto-generated from detected AWS resources
  • Environment variables injected for each resource (table names, queue URLs, key IDs)

No-op at runtime​

All deployless annotations (dpl.configure(), dpl.DynamoDB(), @dpl.cron(), etc.) are no-ops at runtime. When your Flask app starts normally (e.g., python run.py for local development), these calls do nothing. Only the deployless compiler reads them.