Which solution will meet these requirements?
Increase the Lambda function’s batch size. Change the SQS standard queue to an SQS FIFO queue. Request a Lambda concurrency increase in the AWS Region.
Reduce the Lambda function’s batch size. Increase the SQS message throughput quota. Request a Lambda concurrency increase in the AWS Region.
Increase the Lambda function’s batch size. Configure S3 Transfer Acceleration on the S3 bucket. Configure an SQS dead-letter queue.
Keep the Lambda function’s batch size the same. Configure the Lambda function to report failed batch items. Configure an SQS dead-letter queue.
Explanations:
Increasing the Lambda function’s batch size and changing the SQS queue type to FIFO may help with processing order, but it does not address the underlying issue of invalid data. A Lambda concurrency increase may improve throughput, but without handling invalid messages, the same problem could persist.
Reducing the batch size may lead to more Lambda invocations and increased processing time per message, potentially worsening the backlog. Increasing the SQS throughput quota does not directly address the validity of the data. A concurrency increase alone will not solve the issue of invalid data.
Increasing the Lambda function’s batch size may not solve the problem of messages with invalid data causing delays. While S3 Transfer Acceleration can improve upload speeds to S3, it does not address processing timelines for valid messages or invalid data issues. Configuring a dead-letter queue helps with error handling but is not sufficient alone to ensure timely processing of valid messages.
Keeping the batch size the same while configuring the Lambda function to report failed batch items allows for tracking and handling of invalid data. Using an SQS dead-letter queue enables the application to isolate problematic messages, ensuring that valid messages are processed in a timely manner while allowing for further analysis and reprocessing of invalid messages.