'DLQ redrive failed events back to DynamoDB streams?

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?



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MANISH