DLQ redrive failed events back to DynamoDB streams?

7k Views Asked by At

I have a DynamoDB stream triggering a Lambda, and I want to push any failed events to a DLQ.

If the source of a DLQ is an SQS queue, it looks like you can do something called a redrive back to the source queue, where messages in DLQ will be moved back to the source queue.

I am guessing that this isn't possible with if the source is a DynamoDB stream?

1

There are 1 best solutions below

0
On BEST ANSWER

AWS doesn't provide any mechanism as of now to replay failed dynamo DB streams from a DLQ. The messages in the DLQ will have the metadata of the event rather than the actual failed records. In case there is a need to replay the failed dynamo DB streams, it can be done in two step approach.

  1. Get the shard iterator from the event metadata
  2. Using the shard iterator, get the actual failed records from the Dynamo DB and process accordingly

https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_streams_GetShardIterator.html