3 ms·
We ran into this, though we were using millisecond timestamps with the Number type. Ended up working around it by adding numbers after the decimal point. Dynam
by moduspol 3y ago
We ran into this, though we were using millisecond timestamps with the Number type.
Ended up working around it by adding numbers after the decimal point. DynamoDB apparently supports up to 38 digits of precision, and JavaScript (we're NodeJS based) by default encodes numbers to allow for up to 16 digits (combined, before and after the decimal point). A UNIX epoch millisecond timestamp is 13 digits, so we were able to use 3 just to add uniqueness without having to update anything else in our codebase.
We certainly now plan to essentially always use string-based (and generically named) partition and sort keys, which would allow us to more easily do what you're describing.