0

I have data in a DynamoDB database, and I need to search/filter on 10+ attributes (one or many at the same time) without resorting to scanning the entire database for each query.

  • I’ve seen compound sort keys recommended when there are 2 or 3 attributes to search on, but not when there are 10+.
  • I could create DynamoDB indexes for each of the possible filter combinations, but with 10+ attributes to filter on, the number of indexes would be in the millions.
  • I considered copying the data into a relational database that I can just do SQL queries on, but I don’t want to add RDS to my tech stack just for this one problem.

Based on the answers to this question, Elastic search vs Dynamodb for Filtering, it seems like ElasticSearch/OpenSearch is the way to go. Does this seem right?

acoordes
  • 41
  • 7
  • I’ve been exploring Rockset for this use case, placed behind DynamoDB as an index and analytics layer connected with DynamoDB Streams. It’s serverless, includes a variety of indexes, and has a SQL interface. Worth a look maybe. – hunterhacker May 17 '22 at 00:36
  • Does not wanting to add RDS imply you already have OpenSearch in you stack? If not, then RDS is likely cheaper and easier. And if you add RDS, do you really need DDB? – Charles May 17 '22 at 13:57

0 Answers0