Search code examples
amazon-web-servicesamazon-dynamodbamazon-dynamodb-dax

Can we change Target DynamoDB table for a DAX cluster?


We have a service that retrieves data from DynamoDB. Every day, we create a new DynamoDB table, created from scratch by pulling the latest data from downstream data sources.

Compared to the previous day's table, the new table can have some delta in different ways: some new items, some items with different attribute values, and some items no longer part of the table.

We want to use DAX to improve latency performance. Given that we have a new underlying DynamoDB table every day, what is the best way to set up and/or update a DAX cluster to start caching values for the new table when it is ready?


Solution

  • Make sure that your DAX role is able to first write and read to any table, or at least any table with a matching name my-daily-* for example.

    Then, assuming your reads are GetItem/BatchGetItems you can write through the DAX cluster when you insert data to the new table, this will populate your cache as you write the data, making reads instantly performant.