You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The low-level DynamoDB GetItem only works with primary keys though, it doesn't take an index. So I don't think there's a way to support this in the enhanced client.
You can use QueryEnhancedRequest#AttributesToProject to reduce the number of attributes retrieved.
@debora-ito first of all, can't you make the necessary changes to the low-level GetItem? why does it exists only for the main table?
Second, QueryEnhancedRequest#AttributesToProject doesn't help as it will consume the same read units for the whole item and not for the projected attributes, right?
Describe the feature
We need to be able to make a
GetItem
operation on a "slim" index instead of the main tableUse 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 useStream::findAny
but it's less elegant (and maybe slower?)it will eliminate the current flow:
With just getting the generic
T
item (orOptional<T>
)Proposed Solution
add the ability to get a single item from an
DynamoDbIndex
and updateGetItem
as it should not be a breaking change, just an optional field addition.Other Information
No response
Acknowledgements
AWS Java SDK version used
2.20.157
JDK version used
17
Operating System and version
MacOS 14.4, Ubuntu 22.04
The text was updated successfully, but these errors were encountered: