Skip to content

GetItem on index in dynamodb-enhanced dependencyΒ #5013

@ashr123

Description

@ashr123

Describe the feature

We need to be able to make a GetItem operation on a "slim" index instead of the main table

Use Case

average size of items in the main table is ~2KB and the average size of items in our GSI is ~100 bytes, that means much less read units consumed.

We can do it by QueryItem and use Stream::findAny but it's less elegant (and maybe slower?)
it will eliminate the current flow:

 sdkIterable.stream()
		.map(Page::items)
		.flatMap(Collection::stream)
		.findAny()

With just getting the generic T item (or Optional<T>)

Proposed Solution

add the ability to get a single item from an DynamoDbIndex and update GetItem as it should not be a breaking change, just an optional field addition.

Other Information

No response

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

AWS Java SDK version used

2.20.157

JDK version used

17

Operating System and version

MacOS 14.4, Ubuntu 22.04

Metadata

Metadata

Assignees

Labels

dynamodb-enhancedfeature-requestA feature should be added or improved.p3This is a minor priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions