My team is migrating several different DynamoDB tables into a set of two DynamoDB tables. Essentially we're changing the model and consolidating a lot of the data into just two tables (right now it's spread across 6).
We were considering using DynamoDB streams and having those trigger a Lambda that deals with the logic of triggering some API that writes to the new tables. However, I am trying to figure out how to deal with the old data as well, since we'll have to migrate everything already in the table to the new tables also.
I'm guessing one option is to have something running that scans every item in the DynamoDB table (there's around 100 million in some), and for each, call the same API that the Lambda was calling to have the new table written to. However, I'm not sure how that scan of the old table handles when we also have new records being written to old table pretty regularly during the migration.
Does anyone have some advice on doing such a migration and keeping things in sync?
Thanks!