- Newest
- Most votes
- Most comments
You should use a Dead Letter Queue, which will capture metadata about failed records. Then have a Lambda function listening to the DLQ, fetch the item from the stream and push to any service you see fit, such as S3. Using this approach, you lose no data and the stream can continue to operate as normal.
If you really do need longer retention periods, then consider using Kinesis Data Streams which can allow you up to 365 days of retention.
The second link you mentioned regarding retaining failed events in S3 might not be relevant. If there is a bad record that blocks processing of the shard for 24 hours, it means that the records after the failed one may get dropped from the stream, before they even got into the Lambda service. In this case, they will not be sent to S3.
I recommend that you reduce the 24 hours for failed events to prevent this situation. In addition, it will reduce your cost, as if this is a bad record, it will cause Lambda many invocations of the lambda function, which will incur cost.
Relevant content
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 6 months ago

Yes, but I do not want the stream to continue in order to avoid data inconsistency issues further down the line. So ideally I want to have time to deploy a code fix that resolve the failed records and that could potentially take longer than 24 hours.
Then you must use Kinesis Data Streams, as DynamoDB will only every provide you with a maximum of 24 hours.