Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support extending Amazon.Lambda.AspNetCoreServer.Hosting handler #1551

Open
2 tasks
blytheaw opened this issue Jul 25, 2023 · 2 comments
Open
2 tasks

Support extending Amazon.Lambda.AspNetCoreServer.Hosting handler #1551

blytheaw opened this issue Jul 25, 2023 · 2 comments
Labels
feature-request A feature should be added or improved. module/aspnetcore-support p1 This is a high priority issue queued

Comments

@blytheaw
Copy link

Describe the feature

Provide some way to annotate or wrap the abstracted handler provided by Amazon.Lambda.AspNetCoreServer.Hosting so that third party tooling that requires interaction with the handler can be used.

Use Case

Many observability and utility tools for .NET (OpenTelemetry and AWS Lambda Powertools to name the most prominent) require either directly wrapping the Lambda handler or adding annotations to it.

Proposed Solution

Some kind of override or extension method that would allow for slapping annotations or boilerplate around the handler without sacrificing the convenience of Amazon.Lambda.AspNetCoreServer.Hosting. Maybe a delegate in the registration method (AddAWSLambdaHosting) to allow adding some arbitrary code executed before the handler.

Other Information

Amazon.Lambda.AspNetCoreServer.Hosting is an amazing package and solution that lowers the barrier to entry for moving non-serverless .NET APIs to AWS Lambda with very little overhead. I'm excited about this because it can help increase adoption of serverless in my teams and be less intimidating.

However, we need to be able to use observability tooling to go to production, and this is the only real show-stopper for us.

I'm not totally against using the less abstracted method with LambdaEntryPoint / LocalEntryPoint but we've already consolidated Program.cs and Startup.cs using the minimal API startup model and we would have to undo that in all of our services to revert back to this pattern.

Acknowledgements

  • 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.AspNetCoreServer.Hosting

Targeted .NET Platform

.NET 6

Operating System and version

Any

@blytheaw blytheaw added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Jul 25, 2023
@ashishdhingra
Copy link
Contributor

Needs review with the team. CC @normj

@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Jul 25, 2023
@normj
Copy link
Member

normj commented Jul 25, 2023

@ashishdhingra I know about this issue from other conversation channels and this is an important issue for us to figure out how to squeeze in.

@ashishdhingra ashishdhingra added p1 This is a high priority issue queued and removed needs-review labels Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/aspnetcore-support p1 This is a high priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants