1
votes

I'm a beginner of Dynamodb and Dynamodb table stream. I have already created AWS Lambda and enabled DynamoDB stream with trigger that invokes my lambda for every added/updated/delete record. Now I want to perform initial sync operation for all my existing records. How can I do this?

  1. Is there any way to make all existing records in a table to be "reprocessed" and added to stream (so they can be processed by my lambda)?
  2. Do I have to write a custom script?
1

1 Answers

3
votes

To my knowledge there is no way to do this without writing some custom script.

You could for instance write a script that reads every current item out of the table and then writes it back in overwriting itself and putting a new entry in the stream that would then be handled by your existing Lambda.

Another option is to not try and use the stream in any way for the existing items in the table. Leave the steam and Lambda as is for all future writes to the table and write a script that goes through all the existing items and processes them accordingly.