-
Notifications
You must be signed in to change notification settings - Fork 420
Feature request: ability to not throw error on full batch failure #4691
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
7 tasks
7 tasks
|
This is now released under 2.41.0 version! |
This is now released under 2.42.0 version! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use case
Currently when using the Batch Processor utility, if all the records in a batch are marked as failed the utility throws a
BatchProcessingError
.Taking into consideration that the utility is supposed to be used with partial failure reporting, a Lambda function that throws an error is functionally equal to a partial failure that reports all items as failed in the sense that all the items in that batch are retried as a result.
While we initially implemented this as an error to reflect the full batch failure in the operational metrics (i.e. function runtime errors), there are cases such as when processing small batches that this behavior can skew the metrics due to higher chances of a full batch to fail.
To accommodate these use cases, as well as those customers who simply want to avoid throwing an error, we should add a new
raise_on_batch_fail
(or similar) option to the utility that allows customers to opt out of the error throwing mechanism.More information here: aws-powertools/powertools-lambda-typescript#2122 (comment)
Solution/User Experience
Alternative solutions
No response
Acknowledgment
The text was updated successfully, but these errors were encountered: