Questions on SQS Batch Processing Functionality #1074
-
Hi everyone, I've been trying to do some implementations with powertools and the SQS batch processing functionality it provides. Currently, I have a Lambda with a SQS trigger and a SQS standard with dead-letter queue setup using Terraform. I am trying to add in the ability to return a partial success using the powertool libraries. To do this, I first adjusted the aws_lambda_event_source_mapping resource in Terraform to specify that the lambda has a function_types_response = ReportBatchItemFailures. This was based on reading the AWS docs and Terraform docs to turn on the Lambda ability to return a partial success. Through testing scenarios and reading powertools documentation, I noticed that on a full batch failure powertools will return a BatchProcessingError instead of returning the batchItemFailures enum with the all the messageIds and gracefully handling the exceptions. I understand that this would still put the whole batch back in the queue for processing because lambda execution ends in an error, but I am wondering why an exception would be raised here instead of just returning the batchItemFailures enum. Appreciate any help or input on this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
@je1s-chs - i believe some of the behavior for resetting was fixed recently: #1022 Otherwise if you have a smaller example of this not working, i would suggest logging an issue |
Beta Was this translation helpful? Give feedback.
@je1s-chs - i believe some of the behavior for resetting was fixed recently: #1022
Otherwise if you have a smaller example of this not working, i would suggest logging an issue