Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 18 Dec 13:42
· 98 commits to main since this release
ad77c7f

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.* to MinimalLambda.*
  • New testing package: MinimalLambda.Testing for simplified Lambda function testing
  • Lifecycle handlers: New ILambdaLifecycleContext for 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

  1. Update package references in your .csproj files:

    <!-- 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" />
  2. 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;
  3. Perform a global find-and-replace:

    • Search: AwsLambda.Host → Replace: MinimalLambda
    • Search: AwsLambda.Abstractions → Replace: MinimalLambda.Abstractions
    • Search: AwsLambda.OpenTelemetry → Replace: MinimalLambda.OpenTelemetry

2. ILambdaHostContext → ILambdaInvocationContext

  1. 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

  1. 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

  • docs: document MinimalLambda.Testing package and enhance testing guide (#235) @j-d-ha

🔄 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

⚠️ Breaking Changes

  • refactor(abstractions): rename ILambdaHostContext to ILambdaInvocationContext (#253) @j-d-ha
  • feat(host): add ILambdaLifecycleContext for lifecycle handlers (#252) @j-d-ha
  • refactor: rename framework from AwsLambda.Host to MinimalLambda (#227) @j-d-ha