Within my DDB table, I have records containing a field called Timestamp that holds date and time string values like: 2023-11-14T01:22:53.945Z
My goal is simply to perform a database query that retrieves N entries sorted in descending order based on this timestamp. I've come across discussions regarding GSI, ranges, and sort keys which feel overwhelming and confusing.
I don't have specific code examples to share, as I've experimented with different approaches found on ChatGPT and Stack Overflow posts but haven't been able to determine the correct method, especially considering some suggest using Timestamp as secondary keys or defining them within GSI's. (using JavaScript)