Skip to content

Add high-level BatchGetItem abstraction to DynamoDB Mapper #1601

@ianbotsf

Description

@ianbotsf

Describe the feature

DynamoDB's BatchGetItem API takes a list of up to 100 keys and returns up to 100 matching items limited by the 16MB maximum response size. Items which did not fit into the response are returned as "unprocessed keys". A typical use case is to issue a subsequent call to BatchGetItem with the exact list of unprocessed keys and repeat thusly until no unprocessed keys are returned.

DynamoDB Mapper should support a BatchGetItem abstraction which can take an unbounded list of keys (i.e., potentially more than 100) and partition them into appropriate BatchGetItem requests, merging any unprocessed keys with subsequent items from the input keys, and repeating calls until the ensure list is processed. Like paginators, the underlying API calls should be invoked lazily and the return type should be a Flow to allow callers to handle the results when/how they wish and even to terminate before all the items are processed if they so wish, thereby avoiding wasted calls.

Is your feature request related to a problem?

Related to simplifying common usage patterns in high-level DynamoDB interactions.

Proposed Solution

No response

Describe alternative solutions or features you've considered

No response

Acknowledge

  • I may be able to implement this feature request

AWS SDK for Kotlin version

any

Platform (JVM/JS/Native)

any

Operating system and version

any

Metadata

Metadata

Assignees

No one assigned

    Labels

    dynamodb-mapperfeature-requestA feature should be added or improved.p2This is a standard priority issue

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions