I have a table stored in dynamoDB which exemplary dictionary is the following:
{event': 'A',
'timestamp': '2017-10-15 16:20:47,009',
'message': 'AAA'},
{event': 'B',
'timestamp': '2018-10-15 16:20:47,009',
'message': 'BBB'},
{event': 'A',
'timestamp': '2019-10-15 16:20:47,009',
'message': 'BBB'},
{event': 'B',
'timestamp': '2020-10-15 16:20:47,009',
'message': 'AAA'},
I would like to extract only those dictionaries that happened after 2018-10-15 00:00:00
I used the following code to load the table:
import boto3
client = boto3.client("dynamodb", region_name="eu-central-1")
session = boto3.Session(profile_name="myprofile")
resource = session.resource("dynamodb", region_name="eu-central-1")
table = resource.Table("mytable")
I read that this relatively easy task is not so easy to perform when considering dynamodb, for which the global secondary index has to be created.I tried plenty of stuff but everything failed, do you have any idea what can I do to query over timestamp in the simplest manner? I would highly like to avoid using GSI, because for me its very complicated stuff for very easy task to perform.