·
20 commits
to refs/heads/develop
since this release
Summary
We're excited to announce a major release with new features and important updates:
- Strongly-typed batch processor with automatic deserialization for SQS, Kinesis, and DynamoDB events
- Enhanced tracing with improved metadata error handling
- Bug fix for logging sampling rate
This major version bump reflects significant breaking changes as we update our supported runtimes and dependencies.
Breaking Changes
- Removed support for .NET 6 - We now require .NET 8 or later
- AWS SDK v3 no longer supported - We have migrated to AWS SDK v4
- Version alignment - All Powertools for AWS Lambda utilities will maintain version parity going forward
New Features
Strongly-Typed Batch Processor
Process batch events with type safety and automatic deserialization.
What's New:
ITypedRecordHandler<T>
andITypedRecordHandlerWithContext<T>
interfaces for strongly-typed processing- Specialized processors:
TypedSqsBatchProcessor
,TypedKinesisEventBatchProcessor
,TypedDynamoDbStreamBatchProcessor
- Automatic JSON deserialization from event records to your types
- Optional
ILambdaContext
injection for timeout handling and request tracking
Example Usage:
Simple typed handler:
public class OrderHandler : ITypedRecordHandler<Order>
{
public async Task<RecordHandlerResult> HandleAsync(Order order, CancellationToken cancellationToken)
{
// Direct access to strongly-typed object - no manual deserialization!
await ProcessOrder(order);
return RecordHandlerResult.Successful;
}
}
With Lambda context support (docs):
public class ProductHandlerWithContext : ITypedRecordHandlerWithContext<Product>
{
public async Task<RecordHandlerResult> HandleAsync(Product product, ILambdaContext context, CancellationToken cancellationToken)
{
Logger.LogInformation($"Processing product {product.Id} in request {context.AwsRequestId}");
Logger.LogInformation($"Remaining time: {context.RemainingTime.TotalSeconds}s");
// Use context for timeout handling
if (context.RemainingTime.TotalSeconds < 5)
{
Logger.LogWarning("Low remaining time, processing quickly");
}
return RecordHandlerResult.Successful;
}
}
Contributors
Thank you @dcabib for your contributions to this release! ⭐
Changes
🐞 Bug fixes
📜 Documentation updates
- chore: remove dotnet6 from docs and add migration guides for v2 and v3 (#1021) by @hjgraca
- chore(deps): bump squidfunk/mkdocs-material from
86d21da
to00f9276
in /docs (#1013) by @dependabot[bot] - chore: Tracing sanitize metadata (#1011) by @hjgraca
- chore(deps): bump squidfunk/mkdocs-material from
209b62d
to86d21da
in /docs (#996) by @dependabot[bot]
🔧 Maintenance
- chore: remove dotnet6 from docs and add migration guides for v2 and v3 (#1021) by @hjgraca
- chore(deps): bump squidfunk/mkdocs-material from
86d21da
to00f9276
in /docs (#1013) by @dependabot[bot] - chore(deps): bump aws-actions/configure-aws-credentials from 5.0.0 to 5.1.0 (#1020) by @dependabot[bot]
- chore(deps): bump github/codeql-action from 3.30.5 to 3.30.6 (#1014) by @dependabot[bot]
- chore(deps): bump ossf/scorecard-action from 2.4.2 to 2.4.3 (#1012) by @dependabot[bot]
- chore: version update automation (#1018) by @hjgraca
- chore: Tracing sanitize metadata (#1011) by @hjgraca
- chore(deps): bump zgosalvez/github-actions-ensure-sha-pinned-actions from 3.0.25 to 4.0.0 (#1008) by @dependabot[bot]
- chore(deps): bump github/codeql-action from 3.30.4 to 3.30.5 (#1007) by @dependabot[bot]
- chore(deps): bump github/codeql-action from 3.30.3 to 3.30.4 (#1004) by @dependabot[bot]
- chore(deps): bump squidfunk/mkdocs-material from
209b62d
to86d21da
in /docs (#996) by @dependabot[bot] - chore: update AWS SDK dependencies (#999) by @hjgraca
- chore: update environment variable references to use AWS_SDK_UA_APP_ID (#934) by @hjgraca
- chore: drop .NET 6 support, go .NET 8 only #995 @dcabib
- chore: Upgrade to AWS sdk v4 #998 @dcabib
- feat: batch deserialize event records #970 @hjgraca
This release was made possible by the following contributors:
@dependabot[bot], @hjgraca and dependabot[bot]