![]() |
VOOZH | about |
dotnet add package AWS.Lambda.Powertools.BatchProcessing --version 3.2.2
NuGet\Install-Package AWS.Lambda.Powertools.BatchProcessing -Version 3.2.2
<PackageReference Include="AWS.Lambda.Powertools.BatchProcessing" Version="3.2.2" />
<PackageVersion Include="AWS.Lambda.Powertools.BatchProcessing" Version="3.2.2" />Directory.Packages.props
<PackageReference Include="AWS.Lambda.Powertools.BatchProcessing" />Project file
paket add AWS.Lambda.Powertools.BatchProcessing --version 3.2.2
#r "nuget: AWS.Lambda.Powertools.BatchProcessing, 3.2.2"
#:package AWS.Lambda.Powertools.BatchProcessing@3.2.2
#addin nuget:?package=AWS.Lambda.Powertools.BatchProcessing&version=3.2.2Install as a Cake Addin
#tool nuget:?package=AWS.Lambda.Powertools.BatchProcessing&version=3.2.2Install as a Cake Tool
The batch processing utility handles partial failures when processing batches from Amazon SQS, Amazon Kinesis Data Streams, and Amazon DynamoDB Streams.
When using SQS, Kinesis Data Streams, or DynamoDB Streams as a Lambda event source, your Lambda functions are triggered with a batch of messages.
If your function fails to process any message from the batch, the entire batch returns to your queue or stream. This same batch is then retried until either condition happens first: a) your Lambda function returns a successful response, b) record reaches maximum retry attempts, or c) when records expire.
This behavior changes when you enable Report Batch Item Failures feature in your Lambda function event source configuration:
For a full list of features go to docs.aws.amazon.com/powertools/dotnet/utilities/batch-processing/
GitHub: https://github.com/aws-powertools/powertools-lambda-dotnet/
View the full example here: github.com/aws-powertools/powertools-lambda-dotnet/tree/develop/examples/BatchProcessing
[BatchProcessor(RecordHandler = typeof(CustomSqsRecordHandler))]
public BatchItemFailuresResponse HandlerUsingAttribute(SQSEvent _)
{
return SqsBatchProcessor.Result.BatchItemFailuresResponse;
}
public class CustomSqsRecordHandler : ISqsRecordHandler
{
public async Task<RecordHandlerResult> HandleAsync(SQSEvent.SQSMessage record, CancellationToken cancellationToken)
{
/*
Your business logic.
If an exception is thrown, the item will be marked as a partial batch item failure.
*/
var product = JsonSerializer.Deserialize<JsonElement>(record.Body);
if (product.GetProperty("Id").GetInt16() == 4)
{
throw new ArgumentException("Error on 4");
}
return await Task.FromResult(RecordHandlerResult.None);
}
}
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 net8.0 is compatible. net8.0-android net8.0-android was computed. net8.0-browser net8.0-browser was computed. net8.0-ios net8.0-ios was computed. net8.0-maccatalyst net8.0-maccatalyst was computed. net8.0-macos net8.0-macos was computed. net8.0-tvos net8.0-tvos was computed. net8.0-windows net8.0-windows was computed. net9.0 net9.0 was computed. net9.0-android net9.0-android was computed. net9.0-browser net9.0-browser was computed. net9.0-ios net9.0-ios was computed. net9.0-maccatalyst net9.0-maccatalyst was computed. net9.0-macos net9.0-macos was computed. net9.0-tvos net9.0-tvos was computed. net9.0-windows net9.0-windows was computed. net10.0 net10.0 is compatible. net10.0-android net10.0-android was computed. net10.0-browser net10.0-browser was computed. net10.0-ios net10.0-ios was computed. net10.0-maccatalyst net10.0-maccatalyst was computed. net10.0-macos net10.0-macos was computed. net10.0-tvos net10.0-tvos was computed. net10.0-windows net10.0-windows was computed. |
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 3.2.2 | 304 | 5/25/2026 |
| 3.2.1 | 33,416 | 3/19/2026 |
| 3.2.0 | 828 | 3/12/2026 |
| 3.1.0 | 42,655 | 1/6/2026 |
| 3.0.2 | 33,795 | 11/5/2025 |
| 3.0.1 | 1,686 | 10/21/2025 |
| 3.0.1-alpha | 217 | 10/15/2025 |
| 3.0.0 | 2,836 | 10/8/2025 |
| 1.2.1 | 38,688 | 5/20/2025 |
| 1.2.0 | 119,923 | 10/2/2024 |
| 1.1.2 | 6,837 | 8/29/2024 |
| 1.1.1 | 11,116 | 3/10/2024 |
| 1.1.0 | 5,050 | 2/16/2024 |
| 1.0.0 | 1,685 | 12/12/2023 |
| 0.0.1-preview | 906 | 9/20/2023 |