You should probably add more to the sort key like a gameplay_id for the particular play of the game. So your SK becomes "1234#de45a" which is a game_id#gameplay_id concatenated together where de45a is the particular run of the game. Then every game play is tracked, and you can easily query to find all plays by a user, all plays of a user for a particular game, and any particular game play.
You might have different query needs. The data model you pick is directly based on the update and query pattern. I'm just guessing at your query pattern.
Sure thing, feel free to accept the answer.
- Accepted Answerasked a year ago
- Accepted Answerasked a month ago
- asked 9 months ago
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 10 months ago
- AWS OFFICIALUpdated 6 months ago
- EXPERTpublished 6 months ago
- EXPERTpublished 7 months ago
Hi Steven, what does the game_id stand for?
Because, in case of 1) you'd might need more keys if you want more than one result per user+game.