Skip to content

feat(host): add stream feature abstraction layer #179

Description

@j-d-ha

Problem Statement

Currently, input and output streams are accessed directly via RawInvocationData.Event and RawInvocationData.Response. This requires handlers to work with low-level stream abstractions rather than leveraging the framework's feature-based access pattern that already exists for other Lambda context data.

Proposed Solution

Create feature-based abstractions for input and output streams (IInputStreamFeature, IOutputStreamFeature) that follow the established pattern of type-safe feature access in the framework (similar to IEventFeature). This allows handlers to access streams through the abstraction layer while maintaining backward compatibility.

Acceptance Criteria

  • Feature interfaces for input/output streams defined in AwsLambda.Host.Abstractions
  • Default implementations provided in AwsLambda.Host
  • Handler parameter binding support (via attribute or dependency injection)
  • Raw streams still accessible via RawInvocationData for backward compatibility
  • Update existing examples to demonstrate feature-based stream access
  • Documentation/examples updated with new pattern

Implementation Notes

Key areas to modify:

  • src/AwsLambda.Host.Abstractions/Core/Features/ - Add stream feature interfaces
  • src/AwsLambda.Host/Features/ - Add default feature implementations
  • src/AwsLambda.Host/Services/ - Integrate with feature binding/resolution
  • Example projects - Update to demonstrate feature-based access

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions