DynamoDB replication using Stream + Lambda

I am trying to set up DynamoDB table replication using Stream + Lambda. I was wondering how I should handle the failures. For example, I have table A and table B and I'd like to copy any update from table A to table B.

I can set up a trigger using Stream + Lambda. Writing the lambda function to get the events from table A and write to table B is quite straight forward.

However, I am not sure how I should handle the failures. In the lambda function, what should I do if write to table B failed for some reason? I can do retries but what should I do if all retries failed?


Solution 1:

You can use global tables (refer https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/GlobalTables.html) for multi-region, multi-master replication. Everything is taken care by the DynamoDB.