https://github.com/karmaniverous/entity-client-dynamodb
Convenience wrapper for DynamoDB SDK with enhanced batch processing & EntityManager support.
https://github.com/karmaniverous/entity-client-dynamodb
dynamodb
Last synced: 1 day ago
JSON representation
Convenience wrapper for DynamoDB SDK with enhanced batch processing & EntityManager support.
- Host: GitHub
- URL: https://github.com/karmaniverous/entity-client-dynamodb
- Owner: karmaniverous
- Created: 2024-10-02T09:34:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-08T09:31:31.000Z (6 months ago)
- Last Synced: 2025-08-04T13:59:05.906Z (5 months ago)
- Topics: dynamodb
- Language: TypeScript
- Homepage: https://docs.karmanivero.us/entity-client-dynamodb/
- Size: 2.17 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# entity-client-dynamodb
[](https://www.npmjs.com/package/@karmaniverous/entity-client-dynamodb)  [](https://docs.karmanivero.us/entity-client-dynamodb) [](https://github.com/karmaniverous/entity-client-dynamodb/tree/main/CHANGELOG.md) [](https://github.com/karmaniverous/entity-client-dynamodb/tree/main/LICENSE.md)
Type-safe DynamoDB (SDK v3) client for single-table design with powerful querying, great DX, and first-class TypeScript.
Install
```bash
npm i @karmaniverous/entity-client-dynamodb
```
Quick start (tiny)
```ts
import {
EntityClient,
generateTableDefinition,
} from '@karmaniverous/entity-client-dynamodb';
import { EntityManager } from '@karmaniverous/entity-manager';
declare const entityManager: EntityManager;
const client = new EntityClient({
entityManager,
tableName: 'UserTable',
region: 'local',
});
// One-time table creation (from EntityManager config)
await client.createTable({
BillingMode: 'PAY_PER_REQUEST',
...generateTableDefinition(entityManager),
});
// Put / Get (storage records; strip keys for domain)
await client.putItem({ hashKey2: 'h', rangeKey: 'r', a: 1 });
const out = await client.getItem('user', { hashKey2: 'h', rangeKey: 'r' });
const item = out.Item && client.entityManager.removeKeys('user', out.Item);
```
Documentation (guides)
- [Getting Started](./guides/getting-started.md) - Install, wire, and make your first calls.
- [EntityClient: CRUD and Batches](./guides/entityclient-and-crud.md) - Record/recordset operations with strong types.
- [Querying with QueryBuilder](./guides/querying-with-querybuilder.md) - Cross-shard, multi-index querying and projections.
- [Tables & Table Definition](./guides/tables-and-definition.md) - Generate AttributeDefinitions/GSIs/KeySchema.
- [Type Inference Mental Model](./guides/type-inference-model.md) - Tokens, projection K, and values‑first config (CF-enabled index inference).
- [AWS X-Ray](./guides/aws-xray.md) - Enable tracing for the DynamoDB SDK client.
CLI Plugin (get-dotenv)
- [CLI Plugin](./guides/cli/index.md) - get-dotenv plugin (subpath export `@karmaniverous/entity-client-dynamodb/get-dotenv`) for versioned table lifecycle, transforms, migration, config overlays, Local DynamoDB, Serverless, and recipes.
API Reference
- [TypeDoc API](https://docs.karmanivero.us/entity-client-dynamodb) - Full API surface generated from the source.
License
BSD-3-Clause
---
Built for you with ❤️ on Bali! Find more great tools & templates on [my GitHub Profile](https://github.com/karmaniverous).