Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

1.15 #663

Unanswered
hjgraca asked this question in General
1.15 #663
Oct 8, 2024 · 0 comments
Discussion options

Summary

In this release we are excited to announce a new feature in the Batch processing utility and bug fixes in Tracing and Logging.

New Feature: ThrowOnFullBatchFailure

This release introduces a new batch processing option: ThrowOnFullBatchFailure. This option controls whether a BatchProcessingException should be raised on full batch failure.

⭐ Special thanks to @lachriz-aws for developing this feature.

Batch processing 1.2.0

The ThrowOnFullBatchFailure option can be set via:

  • A new ThrowOnFullBatchFailure field on the BatchProcessor attribute (applied in non-utility mode)
  • A new environment variable POWERTOOLS_BATCH_THROW_ON_FULL_BATCH_FAILURE (applied in non-utility mode)
  • Directly on the AWS.Lambda.Powertools.BatchProcessing.ProcessingOptions in utility mode

ThrowOnFullBatchFailure attribute usage
ThrowOnFullBatchFailure ProcessingOptions usage

Behavior

When processing of an entire batch fails:

  • If ThrowOnFullBatchFailure is set to false, the Batch Processor will not throw an exception after batch processing has completed. Instead, it will return the IDs of the failed items (all batch items in this case) and exit gracefully.
  • If a Lambda function is configured with ErrorHandlingPolicy = StopOnFirstBatchItemFailure and the first batch item fails processing, the entire batch is marked as failed (as per the documentation). In this case, if ThrowOnFullBatchFailure is set to false, the behavior described above will apply.

Note: The new ThrowOnFullBatchFailure option is compatible with the existing error handling policies.

Bug Fixes

Tracing Update

Logging Update

Changes

🌟New features and non-breaking changes

📜 Documentation updates

🔧 Bug Fixes

This release was made possible by the following contributors:

@hjgraca and @lachriz-aws


This discussion was created from the release 1.15.
You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant

AltStyle によって変換されたページ (->オリジナル) /