-
Notifications
You must be signed in to change notification settings - Fork 498
Add support for Lambda Response Streaming in ASP.NET Core bridge packages #2293
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
base: normj/response-streaming
Are you sure you want to change the base?
Changes from all commits
8acb864
64ad36a
694c176
e9f7dd7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| { | ||
| "Projects": [ | ||
| { | ||
| "Name": "Amazon.Lambda.AspNetCoreServer", | ||
| "Type": "Major", | ||
| "ChangelogMessages": [ | ||
| "[Breaking] Update build targets from .NET 6 and 8 to .NET 8 and 10", | ||
| "[Preview] Add support Lambda Response Streaming enabled by setting the EnableResponseStreaming property from the base class AbstractAspNetCoreFunction" | ||
| ] | ||
| }, | ||
| { | ||
| "Name": "Amazon.Lambda.AspNetCoreServer.Hosting", | ||
| "Type": "Major", | ||
| "ChangelogMessages": [ | ||
| "[Breaking] Update build targets from .NET 6 and 8 to .NET 8 and 10", | ||
| "[Preview] Add support Lambda Response Streaming enabled by setting the EnableResponseStreaming property on the HostingOptions object passed into the AddAWSLambdaHosting method" | ||
|
||
| ] | ||
| }, | ||
| { | ||
| "Name": "Amazon.Lambda.Logging.AspNetCore", | ||
| "Type": "Major", | ||
| "ChangelogMessages": [ | ||
| "[Breaking] Update build targets from .NET 6 and 8 to .NET 8 and 10" | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -9,6 +9,12 @@ namespace Amazon.Lambda.AspNetCoreServer.Hosting; | |||||||||||||||
| /// </summary> | ||||||||||||||||
| public class HostingOptions | ||||||||||||||||
| { | ||||||||||||||||
| internal const string ParameterizedPreviewMessage = | ||||||||||||||||
| "Response streaming is in preview till a new version of .NET Lambda runtime client that supports response streaming " + | ||||||||||||||||
| "has been deployed to the .NET Lambda managed runtime. Till deployment has been made the feature can be used by deploying as an " + | ||||||||||||||||
| "executable including the latest version of Amazon.Lambda.RuntimeSupport and setting the \"EnablePreviewFeatures\" in the Lambda " + | ||||||||||||||||
| "project file to \"true\""; | ||||||||||||||||
|
|
||||||||||||||||
| /// <summary> | ||||||||||||||||
| /// The ILambdaSerializer used by Lambda to convert the incoming event JSON into the .NET event type and serialize the .NET response type | ||||||||||||||||
| /// back to JSON to return to Lambda. | ||||||||||||||||
|
|
@@ -27,6 +33,14 @@ public class HostingOptions | |||||||||||||||
| /// </summary> | ||||||||||||||||
| public bool IncludeUnhandledExceptionDetailInResponse { get; set; } = false; | ||||||||||||||||
|
|
||||||||||||||||
| /// <summary> | ||||||||||||||||
| /// When true, the Lambda hosting server will invoke <c>StreamingFunctionHandlerAsync</c> | ||||||||||||||||
| /// instead of <c>FunctionHandlerAsync</c>, enabling Lambda response streaming. | ||||||||||||||||
| /// Requires net8.0 or later. | ||||||||||||||||
|
Comment on lines
+37
to
+39
|
||||||||||||||||
| /// When true, the Lambda hosting server will invoke <c>StreamingFunctionHandlerAsync</c> | |
| /// instead of <c>FunctionHandlerAsync</c>, enabling Lambda response streaming. | |
| /// Requires net8.0 or later. | |
| /// When true, the Lambda hosting server enables Lambda response streaming behavior | |
| /// when invoking <c>FunctionHandlerAsync</c>. In streaming mode, | |
| /// <c>FunctionHandlerAsync</c> writes directly to the Lambda response stream and | |
| /// returns <c>null</c>. Requires net8.0 or later. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog message grammar: "Add support Lambda Response Streaming enabled by setting..." is missing "for" and reads awkwardly. Consider rephrasing to something like "[Preview] Add support for Lambda response streaming, enabled by setting the EnableResponseStreaming property on AbstractAspNetCoreFunction" for clarity.