I am developing a marketplace for trading cards using Amazon DynamoDB. The application needs to support dynamic filtering of cards by multiple attributes such as game, set, and grade. Users should be able to filter cards by one or many of these attributes simultaneously.
For example, a user might want to find all cards from "Game A" that are part of "Set B" and have a "Grade C". Each of these filters could be applied individually or in combination.
From my understanding, performing a scan operation for this would be inefficient and could become expensive as the number of items grows. I ve read about using Global Secondary Indexes (GSIs) to speed up queries on non-key attributes, but it seems like each query operation can only use one index, and I need to filter on multiple attributes.
Is there a way to structure my DynamoDB table or GSIs such that I can efficiently query by multiple attributes without having to resort to a scan operation? Any help or guidance would be greatly appreciated.