dynamodb-onetable
OneTable is a TypeScript/JavaScript library that simplifies working with DynamoDB by providing a schema-driven, high-level API for single-table designs. It handles type marshaling, validations, and query generation while maintaining full access to underlying DynamoDB capabilities.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | sensedeep/dynamodb-onetable |
| Owner | sensedeep |
| Primary language | TypeScript |
| License | MIT — OSI-approved |
| Stars | 716 |
| Forks | 113 |
| Open issues | 20 |
| Latest release | v2.7.7 (2025-02-25) |
| Last updated | 2025-09-11 |
| Source | https://github.com/sensedeep/dynamodb-onetable |
What dynamodb-onetable is
OneTable abstracts DynamoDB operations (CRUD, transactions, batch, GSI/LSI queries) through a schema-based model layer with automatic TypeScript type inference. It manages key templating, expression generation (conditional, filter, key, update), and supports both AWS SDK v2 and v3 clients.
Get the dynamodb-onetable source
Clone the repository and explore it locally.
git clone https://github.com/sensedeep/dynamodb-onetable.gitcd dynamodb-onetable# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Schema design is critical: invest time in defining keys, GSI/LSI structure, and attribute packing before implementation; mistakes are costly to refactor at scale.
- Type safety is automatic but requires TypeScript adoption and use of `as const` in schema definitions; JavaScript codebases lose compile-time validation benefits.
- Audit DynamoDB cost implications of query patterns, especially filter expressions and full table scans, as the library abstracts but does not prevent inefficient access.
- Plan for migrations early using OneTable Migrate or OneTable CLI if schema evolution is expected; schema versioning is supported but requires discipline.
- Encrypted fields are supported but key management (rotation, storage) must be handled outside the library; consider AWS KMS or application-level encryption strategy.
When to avoid it — and what to weigh
- You need relational join semantics or complex transactions across entities — While OneTable supports transactions and batch operations, it does not provide cross-entity relationship management or distributed transaction coordination beyond DynamoDB's native capabilities.
- Your team is unfamiliar with single-table design patterns — OneTable requires solid understanding of DynamoDB's key design, sparse indexes, and overloading strategies. Misuse can lead to inefficient queries or poor access patterns.
- You require Python, Go, or other non-Node.js runtimes — OneTable is Node.js/TypeScript only. Other languages will need alternative DynamoDB libraries or clients.
- You need real-time data synchronization or change data capture (CDC) — OneTable does not include CDC, event streaming, or replication features. You would need to integrate DynamoDB Streams separately.
License & commercial use
MIT License. Permissive OSI-approved license allowing free use, modification, and distribution in commercial and private projects with attribution.
MIT license permits commercial use without restriction. No vendor lock-in, licensing fees, or proprietary agreements. Attribution required in redistributions. Verify your internal license compliance policy but no barriers to production use identified.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Active |
| Documentation | Strong |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
Library does not enforce DynamoDB authorization or authentication—those are AWS SDK client concerns. Field-level encryption supported but key management is the application's responsibility. No security audit details published. Validate encryption strategy and DynamoDB IAM policies independently. Logging is controllable but sensitive data (PII in keys/attributes) requires explicit handling in schema design.
Alternatives to consider
AWS SDK v3 DynamoDB client (low-level)
Direct AWS SDK offers maximum control and minimal abstraction but requires manual expression generation, type management, and validation. Suitable if you prefer explicit control over OneTable's convenience trade-offs.
Dynamoose (Node.js ODM)
Similar schema-driven approach with TypeScript support, but follows traditional ODM patterns. May be easier for teams with SQL/Mongoose backgrounds but less optimized for single-table designs.
TypeORM with DynamoDB dialect (experimental)
Brings familiar ORM semantics to DynamoDB but dialect support is limited and community-driven. Overkill for single-table patterns but may suit teams deeply invested in TypeORM.
Build on dynamodb-onetable with DEV.co software developers
Evaluate OneTable for your DynamoDB single-table architecture. We can assess schema design, integration points, and cost optimization with your AWS infrastructure.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
dynamodb-onetable FAQ
Does OneTable handle DynamoDB provisioning and capacity management?
Can I migrate from a multi-table to single-table design with OneTable?
Is OneTable suitable for real-time applications or high-frequency updates?
What happens if my schema changes after data is in production?
Software developers & web developers for hire
DEV.co helps companies turn open-source tools like dynamodb-onetable into production software. Our software development services cover the full lifecycle — architecture, web development, integration, and maintenance — delivered by software developers and web developers who ship. Engage our software development agency to implement or customize it for your open-source databases stack.
Ready to build serverless with OneTable?
Evaluate OneTable for your DynamoDB single-table architecture. We can assess schema design, integration points, and cost optimization with your AWS infrastructure.