Which solution will meet these requirements?
Increase the retry attempts.
Configure the setting to split the batch when an error occurs.
Increase the concurrent batches per shard.
Decrease the maximum age of record.
Explanations:
Increasing the retry attempts would not necessarily reduce the number of errorless records sent to the dead-letter queue. It may lead to more retries for failed records, but if those records do not have errors, they will still end up in the dead-letter queue if the function continues to fail for unrelated reasons.
Configuring the setting to split the batch when an error occurs allows the Lambda function to process individual records in a batch. This means that if one record in a batch fails, the successful records will not be retried or sent to the dead-letter queue unnecessarily. This configuration helps reduce the number of errorless records being sent to the dead-letter queue.
Increasing the concurrent batches per shard does not directly address the issue of errorless records being sent to the dead-letter queue. This option may improve throughput but does not change the handling of records that are failing due to processing errors.
Decreasing the maximum age of the record would only affect how long a record can remain in the stream before it is discarded. This setting does not impact how records are processed or reduce the number of records sent to the dead-letter queue that have already been successfully processed.