Both turn a schema into a typed API, auth, storage, and realtime. backlex runs anywhere — the edge or your own server — on a relational database you own, with built-in vector search and a runtime MCP server, instead of binding your backend to AWS-managed services.
AWS Amplify (Gen 2) is a TypeScript-first way to define a backend that AWS provisions for you: AppSync GraphQL over DynamoDB, Cognito for auth, S3 for storage, and Lambda for functions. The libraries are open source, but the running backend lives in your AWS account. backlex offers the same "define a model, get an API" flow without the lock-in — the same Apache-2.0 codebase deploys to Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, Deno Deploy, or your own server (Bun, Node, or Deno), runs on PostgreSQL or SQLite, and ships built-in vector search plus a first-class runtime MCP server.
| backlex | AWS Amplify | |
|---|---|---|
| License | Apache-2.0 — runs anywhere | Apache-2.0 libraries & CLI, but the backend is AWS-managed services |
| Runtimes | 9 runtimes — Cloudflare Workers, Vercel, Netlify, AWS Lambda, Google Cloud & Azure Functions, Deno Deploy, or self-host on Bun/Node/Deno | AWS only (AppSync, Lambda, DynamoDB, Cognito, S3) |
| Edge-native | Runs inside the edge runtime | No — AWS regional managed services |
| Database | PostgreSQL and SQLite / Cloudflare D1 | DynamoDB (NoSQL) by default; SQL via custom resolvers |
| Data model | Managed tables (dynamic, additive-only DDL) or adopt existing tables via a metadata row | Schema-defined GraphQL models (provisions DynamoDB); existing data via custom resolvers |
| REST + GraphQL | Both, auto-generated; nested-relation filters, expand, aggregation | GraphQL via AppSync (REST via API Gateway add-on) |
| Realtime | Live row changes streamed to clients over Server-Sent Events (SSE), permission-filtered | AppSync GraphQL subscriptions (WebSocket) |
| Permissions | Role-based DSL: conditions + field-level allow-lists, one model across APIs + realtime | Authorization rules (owner / group / public) via Cognito + IAM |
| Multi-tenancy | First-class — workspaces with isolated data, end-users, auth, SSO & email; one deployment serves many, sessions pinned per tenant | DIY via Cognito groups + authorization rules |
| Vector search | Built in — pgvector or Cloudflare Vectorize; auto-embed on write | Not built in (Amazon OpenSearch / Bedrock) |
| Embedding models | OpenAI, Workers AI (bge-m3), or self-hosted TEI/Ollama/vLLM | — (bring Amazon Bedrock) |
| AI agent runtime | Built in — define agents that reason over your data and call your tools (DSL-scoped) in a persisted thread, with per-thread vector memory + live step streaming | Not built in (build on Amazon Bedrock yourself) |
| MCP server | Built-in runtime MCP server — collections, vector & admin to agents, per-key tool allow-lists + read-only guards | Community MCP server for Amplify Data |
| Storage + images | Files with ACLs, signed URLs; image transforms on Bun in-process or the Cloudflare edge | Amazon S3 storage; transforms via Lambda / CloudFront |
| Edge functions | Sandboxed functions — http / event / cron triggers | AWS Lambda functions |
| Automation | Visual, no-code op-chains on item events | Lambda / EventBridge (custom) |
| Webhooks | Signed webhooks on item events | Custom (Lambda / API Gateway) |
| Auth providers | Email/password, OAuth, magic link, email-OTP, passkeys | Amazon Cognito (email/password, OAuth, federation) |
| SSO | SAML 2.0 + LDAP/AD (per workspace) | SAML / OIDC via Cognito federation |
| Audit logs | Built-in activity trail + opt-in sensitive-read auditing + revisions | CloudTrail / CloudWatch (AWS-level) |
| Client SDKs | 11 first-party SDKs — TS, Python, Go, Rust, Swift, Kotlin, Dart, Java, .NET, Ruby, PHP | JS/TS, Swift, Android & Flutter client libraries |
| Admin UI + CLI | Admin SPA and the `backlex` CLI (migrate, gen-types) | Amplify console + CLI |
| Messaging (push + SMS) | Built in — FCM/APNs/Web Push + SMS (Twilio/Amazon SNS), per-tenant credentials, registries & templates | Push / SMS via Amazon Pinpoint / SNS (separate services) |
| Batch / transactional writes | Bulk + opt-in atomic (all-or-nothing) writes over REST and GraphQL | DynamoDB batch / transactions (DataStore) |
| Background jobs | Durable queue — retry with backoff, dead-letter, delayed/scheduled — built in | Amazon SQS + Lambda (separate services) |
| Resumable uploads | TUS 1.0.0 chunked/resumable, native R2 / S3 multipart | S3 multipart uploads (Storage) |
| Draft / publish | Built-in draft↔published status, dedicated publish permission, scheduled publishing | Not built in (DIY) |
| Feature flags / remote config | Built in — rollout-% + permission-DSL targeting, evaluated per caller | AWS AppConfig (separate service) |
| Offline-first sync | Incremental changefeed + tombstones + client store (IndexedDB) + offline write queue — open protocol | Amplify DataStore offline sync |
| Auth hardening | Per-IP rate-limiting + account lockout, 2FA/TOTP, email verification | Amazon Cognito (rate limits, MFA, lockout) |
Amplify provisions DynamoDB (NoSQL) behind an AppSync GraphQL API in your AWS account; relational access and existing data go through custom resolvers. backlex runs directly on PostgreSQL or SQLite / Cloudflare D1 and either creates managed tables or adopts an existing database by writing a metadata row — relations, permissions, and realtime come for free, and nothing is tied to a single cloud. One permissions DSL replaces the Cognito-plus-IAM authorization model.
Semantic search is built into backlex: flag a collection's text fields
and it auto-embeds on write and runs ANN search via
pgvector or
Cloudflare Vectorize,
with embeddings from OpenAI, Workers AI, or a self-hosted model — and the
same vectors reach agents through the vector.search MCP tool
and the Ask-AI / RAG page. With Amplify you assemble it from separate AWS
services — Amazon OpenSearch for search and Bedrock for embeddings — and
wire them together yourself.
See the backlex documentation or the source on GitHub to get started. backlex's core is free and open under Apache-2.0; the managed Cloud is optional.