-
Notifications
You must be signed in to change notification settings - Fork 82
Open
Description
Summary
Add support for passing a DynamoDB client dynamically at query execution time via the go() method options, allowing per-request client selection without modifying the Entity/Service instance.
Motivation
Currently, the DynamoDB client must be set at Entity/Service instantiation time or via setClient(). This creates challenges for:
- Multi-region routing: Directing queries to different AWS regions based on user location or data residency
- Multi-tenancy: Supporting different AWS accounts per tenant
Proposed API
await entity.get({ id }).go({ client: dynamicClient });Expected Behavior
- The
clientpassed ingo()options takes precedence over the instance client - Both v2 and v3 AWS SDK clients should be supported and auto-detected
- If no client exists at instance level and none provided at
go()time, throw a clear error - The dynamic client should be used for all pages during pagination
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels