aws / aws/aws-lambda-dotnet

Is there an ETA for Configure method with ILambdaInvokeBuilder?

Open
#1,714 6 comments 2 reactions 0 assignees View on GitHub
annotations feature-request m p2 queued
Dominant language
C#
Stars
1.7k
Forks
503
Avg merge
1d 5h
Merged PRs (30d)
18

Description

### Describe the feature

Hey I want to create middleware or filter pipeline for lambda function
There is note about middleware in design doc but no information when it will happen

There are old PR without CR like [this](https://github.com/aws/aws-lambda-dotnet/pull/1203) and idk if I should contribute

### Use Case

global error handling, extracting standard headers like trace-id

### Proposed Solution

I have workaround with more generated code and castle.core for intercepting calls
For class FunctionHandler I can generate IFunctionHandler and FunctionHandlerWrapper.
Next I can call FunctionHandler from FunctionHandlerWrapper.
Also need to register FunctionHandler as TryAddSingleton so it is interceptable.

Maybe before full middleware pipeline implementation can we add option to generate IFunctionHandler by the annotation framework and resolve it from DI by interface in generated code?

### Other Information

_No response_

### Acknowledgements

- [X] I may be able to implement this feature request
- [ ] This feature might incur a breaking change

### AWS .NET SDK and/or Package version used

Amazon.Lambda.Annotations --version 1.2.0

### Targeted .NET Platform

.NET 6

### Operating System and version

AmazonLinux

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.