v2.0.0
Summary
This major release represents a complete rebranding from AwsLambda.Host to MinimalLambda, along with significant API improvements and the introduction of a new testing package. The release includes three breaking changes that require migration steps, new lifecycle handler capabilities, enhanced testing support, and improved envelope handling for multiple response types.
Key highlights:
- Framework rebranding: All packages renamed from
AwsLambda.*toMinimalLambda.* - New testing package:
MinimalLambda.Testingfor simplified Lambda function testing - Lifecycle handlers: New
ILambdaLifecycleContextfor managing Lambda lifecycle events - Enhanced envelopes: Support for multiple response types with shared extension methods
- API refinements: More intuitive naming conventions for core interfaces and attributes
Migration Steps
1. Framework Renamed: AwsLambda.Host → MinimalLambda
-
Update package references in your
.csprojfiles:<!-- OLD --> <PackageReference Include="AwsLambda.Host" Version="x.x.x" /> <PackageReference Include="AwsLambda.Abstractions" Version="x.x.x" /> <PackageReference Include="AwsLambda.OpenTelemetry" Version="x.x.x" /> <!-- NEW --> <PackageReference Include="MinimalLambda" Version="x.x.x" /> <PackageReference Include="MinimalLambda.Abstractions" Version="x.x.x" /> <PackageReference Include="MinimalLambda.OpenTelemetry" Version="x.x.x" />
-
Update namespace imports throughout your codebase:
// OLD using AwsLambda.Host; using AwsLambda.Abstractions; using AwsLambda.OpenTelemetry; // NEW using MinimalLambda; using MinimalLambda.Abstractions; using MinimalLambda.OpenTelemetry;
-
Perform a global find-and-replace:
- Search:
AwsLambda.Host→ Replace:MinimalLambda - Search:
AwsLambda.Abstractions→ Replace:MinimalLambda.Abstractions - Search:
AwsLambda.OpenTelemetry→ Replace:MinimalLambda.OpenTelemetry
- Search:
2. ILambdaHostContext → ILambdaInvocationContext
- Update interface references in handler methods:
// OLD lambda.MapHandler((ILambdaHostContext context) => { var requestId = context.AwsRequestId; return Results.Ok(requestId); }); // NEW lambda.MapHandler((ILambdaInvocationContext context) => { var requestId = context.AwsRequestId; return Results.Ok(requestId); });
3. [Event] Attribute → [FromEvent] Attribute
- Update attribute usage in handler method parameters:
// OLD lambda.MapHandler(([Event] MyEvent evt) => { return Results.Ok(evt.Message); }); // NEW lambda.MapHandler(([FromEvent] MyEvent evt) => { return Results.Ok(evt.Message); });
Changes
🚀 Features
- feat(host): add ILambdaLifecycleContext for lifecycle handlers (#252) @j-d-ha
- feat(testing): add customizable JSON serializer options to LambdaTestServer (#251) @j-d-ha
- feat(envelopes): support multiple response types with shared extension methods (#213) @j-d-ha
- feat(testing): add MinimalLambda.Testing package (#233) @j-d-ha
- feat(docs): refine messaging to emphasize Lambda-first design (#228) @j-d-ha
🐛 Bug Fixes
- fix(testing): prevent DI container disposal during test execution (#234) @j-d-ha
- fix(build): add build targets for packaging (#231) @j-d-ha
- fix(core): adjust default timeout values and update documentation (#226) @j-d-ha
📚 Documentation
🔄 Refactoring
- refactor(source-generators): improve type casting and output generation (#254) @j-d-ha
- refactor(abstractions): rename ILambdaHostContext to ILambdaInvocationContext (#253) @j-d-ha
- refactor(core): replace [Event] attribute with [FromEvent] (#250) @j-d-ha
- refactor: rename framework from AwsLambda.Host to MinimalLambda (#227) @j-d-ha
🔧 Maintenance
- chore(deps): bump dotnet-sdk from 10.0.100 to 10.0.101 (#239) @dependabot
- chore(deps): bump actions/checkout from 4 to 6 (#241) @dependabot
- chore(deps): bump the minor-and-patch group with 2 updates (#242) @dependabot
- chore(deps): bump actions/setup-python from 5 to 6 (#245) @dependabot
- chore(deps): bump actions/upload-pages-artifact from 3 to 4 (#246) @dependabot
- chore(github): add pip ecosystem and ignore release-drafter (#248) @j-d-ha
- chore(deps): Bump the minor-and-patch group with 12 updates (#247) @dependabot
- chore(deps): update Microsoft.Extensions.Hosting from RC to stable (#232) @j-d-ha
- chore: remove obsolete code and deprecated features (#229) @j-d-ha