We have a Dynamodb table Events
with about 50 million records that look like this:
{
"id": "1yp3Or0KrPUBIC",
"event_time": 1632934672534,
"attr1" : 1,
"attr2" : 2,
"attr3" : 3,
...
"attrN" : N,
}
The Partition Key=id
and there is no Sort Key
. There can be a variable number of attributes other than id
(globally unique) and event_time
, which are required.
This setup works fine for fetching by id
but now we'd like to efficiently query against event_time
and pull ALL attributes for records that match within that range (could be a million or two items). The criteria would be equal to something like WHERE event_date between 1632934671000 and 1632934672000
, for example.
Without changing any existing data or transforming it through an external process, is it possible to create a Global Secondary Index using event_date
and projecting ALL attributes that could allow a range query? By my understanding of DynamoDB this isn't possible but maybe there's another configuration I'm overlooking.
Thanks in advance.