-
Notifications
You must be signed in to change notification settings - Fork 488
AddAWSLambdaHosting support for application/x-www-form-urlencoded #1423
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
Comments
Needs review with the team. Related to Lambda Annotations per #979 (comment). |
To make sure I understand is this what you have in mind
Is there any precedence for doing this in ASP.NET Core? I'm leery of doing this in the ASP.NET Core bridge unless there is some precedence for it. Most users that use the bridge use it because they want similar behavior local testing with Kestrel and with the deployed function. The feature might make more sense in our Lambda Annotations library we are more designing our own programming model. |
@normj thanks for jumping on the thread! You final comments make a good point - per precedence. We have had significant trouble using the developer/testing tools (aws/aws-toolkit-jetbrains#3175) with the Annotations Lambdas and as such have limited our usage - opting for the ASP.NET Core bridge approach - so your Kestrel "similar behavior" point runs true. The gap this is trying to close its that there a numerous articles that show to do the transform in the API Gateway, and this is not available the running local via Kestrel - largely to provide a work around for limited [FromForm] semantics in Aps.Net Core (dotnet/aspnetcore#39430). I think I saw something to do with Annotation here too? So yes this was pitched incorrectly as the need for more a developer support feature. As such perhaps this is better suited to the testing tools and the ability to have that perform transforms ones API Gateway would otherwise? Per the issue above (aws/aws-toolkit-jetbrains#3175) since it seems to be an AWS repo (?) I wonder of you have any influence there? On review we can drop/close this feature Request! Whilst also talking annotations, the only other challenge we see short term with a wider adoption vs. the Kestrel bridge, beyond developer tooling, is related to:
Also AoT support as discussed elsewhere - ties to #2 - but also the broader AWSSDK and its use of reflection (Try semantics) and ensuring Trimming primitives are set up correctly - We have to do Self Contained/Single Executable builds as we run into Lambda size limitation quickly. This invariably needs trimming too. |
@Simonl9l I responded to your issue for debugging Annotations with Rider. I would like to understand more your comments about the Annotations library in general. If you are up for video call I would love to get together and discuss it. You can email me if you that sounds interesting. My email is the same username normj with the @amazon.com domain added to it. |
I am going to close the issue in the context of ASP.NET Core though. |
|
Describe the feature
Have bulletin support in the Lambda Hosting to transform requests of content type
application/x-www-form-urlencoded
intoJSON
structures that tie into the Minimal API[FromBody]
(to define the structure) such that form data requests can be processed easily.Use Case
Some vendors integration (Stripe specifically) use browser forms submission via once API layer to configure Checkout and Customer Portal integration, that then cause a redirect on the client.
Today this can be achieved if deploying to say and API Gateway by configuring a Request Transform for the given request; however either when running locally (debug - with Kestrel hosting) or behind and ALB this transform layer is not otherwise there so there is an impedance mismatch.
Such a feature streamlines the developer/devOps/deployment experience and minimizes extra configuration (API Gateway).
Proposed Solution
Per the feature description above this seem self explanatory.
Other Information
A potential short temp workaround would be to develop custom middle ware but its not clear (documentation) how that integrates with the Lambda runtime when not in local Kestrel mode.
Acknowledgements
AWS .NET SDK and/or Package version used
Amazon.Lambda.RuntimeSupport = 1.8.2
AWSSDK.ApiGatewayV2 3.7.100.54
Targeted .NET Platform
.NET 7
Operating System and version
MacOs/Windows/linux
The text was updated successfully, but these errors were encountered: