Add support for Lambda Response Streaming#2288
Merged
Merged
Conversation
…-lambda-dotnet into normj/response-streaming
2ed63cc to
d60bb93
Compare
96dc138 to
0bd63a9
Compare
* release_2026-04-08 * Update test app CloudFormation templates * Updated changelog
* Add [S3Event] annotation attribute and source generator support - S3EventAttribute with Bucket (required), ResourceName, Events, FilterPrefix, FilterSuffix, Enabled - S3EventAttributeBuilder for Roslyn AttributeData parsing - TypeFullNames constants and Events hashset registration - SyntaxReceiver secondary attribute registration - EventTypeBuilder S3 event type mapping - AttributeModelBuilder S3 branch - CloudFormationWriter ProcessS3Attribute (SAM S3 event with Ref, Events list, Filter rules) - LambdaFunctionValidator ValidateS3Events (params, return type, dependency check) - DiagnosticDescriptors InvalidS3EventAttribute (AWSLambda0133) Add S3Event annotation tests - ValidS3Events.cs.txt test source with 3 test functions - S3EventsTests.cs CloudFormation writer tests (attribute application + property sync) - S3Events project references in TestServerlessApp.csproj and test project IT test PR comments change file fixes PR comments * add header
* treat warnings as errors * Change file
* chore: improve test flakiness * update changelog
…enerator (#2324) * Phase 1: Add FunctionUrlAttribute with source generator wiring and CloudFormation FunctionUrlConfig generation - New FunctionUrlAttribute class with AuthType property (NONE/AWS_IAM) - New FunctionUrlAuthType enum - Source generator detects FunctionUrlAttribute and maps to EventType.API - Generated wrapper uses HttpApi V2 request/response types (same payload format) - CloudFormationWriter emits FunctionUrlConfig on the function resource - Dependency validation checks for Amazon.Lambda.APIGatewayEvents - SyntaxReceiver detects missing [LambdaFunction] on [FunctionUrl] methods - 6 new unit tests for CloudFormation template generation (JSON + YAML) Phase 2: Add CORS support to FunctionUrlAttribute - AllowOrigins, AllowMethods, AllowHeaders, ExposeHeaders, AllowCredentials, MaxAge properties - FunctionUrlAttributeBuilder parses all CORS properties from AttributeData - CloudFormationWriter emits Cors block under FunctionUrlConfig only when CORS properties are set - 4 new unit tests for CORS generation and no-CORS scenarios Phase 3: FunctionUrlConfig orphan cleanup and attribute switching - Remove FunctionUrlConfig from template when [FunctionUrl] attribute is removed - Clean transition when switching from [FunctionUrl] to [HttpApi] or [RestApi] - 4 new unit tests for orphan cleanup and attribute switching scenarios Phase 4: End-to-end source generator test for FunctionUrl - FunctionUrlExample.cs test source with [FunctionUrl] + [FromQuery] + IHttpResult - Generated wrapper snapshot using HttpApi V2 payload format - Serverless template snapshot with FunctionUrlConfig - Full Roslyn source generator verification test IT tests Update Libraries/src/Amazon.Lambda.Annotations.SourceGenerator/Models/Attributes/FunctionUrlAttributeBuilder.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> copilot comments change file fix cleanup add header PR comments * fix template * fix test
* release_2026-04-14 * Update test app CloudFormation templates * Updated changelog
Add CODEOWNERS file
GarrettBeatty
approved these changes
Apr 15, 2026
philasmar
approved these changes
Apr 15, 2026
* Add CODEOWNERS file * Add [SNSEvent] annotation attribute and source generator support - SNSEventAttribute with Topic, ResourceName, FilterPolicy, Enabled - SNSEventAttributeBuilder for Roslyn AttributeData parsing - Source generator wiring (TypeFullNames, SyntaxReceiver, EventTypeBuilder, AttributeModelBuilder) - CloudFormationWriter ProcessSNSAttribute (SAM SNS event subscription) - LambdaFunctionValidator ValidateSNSEvents - DiagnosticDescriptors InvalidSNSEventAttribute - SNSEventAttributeTests (attribute unit tests) - SNSEventsTests (CloudFormation writer tests) - E2E source generator snapshot tests - Integration test (SNSEventSubscription) - Sample function (SnsMessageProcessing) - .autover change file - README documentation pr comments fix tests fix tests fix tests * add header --------- Co-authored-by: AlexDaines <55813219+AlexDaines@users.noreply.github.com>
* release_2026-04-16 * Update test app CloudFormation templates * Updated changelog
GarrettBeatty
pushed a commit
that referenced
this pull request
May 6, 2026
* Task 1 * Task 2 * Task 3 * Add support for Lambda Response Streaming (#2288) * Remove out of support build targets and fix all compiler warnings.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue #, if available:
#1635
Description of changes:
Integrate Lambda response streaming support into the Amazon.Lambda.RuntimeSupport.
A hello world example of using response streaming. In this case sense I wrapped the
Streamreturned fromCreateStreamin aStreamWriterthe writes will be buffered inStreamWritertill the buffer is full. I call the flush method every 10 iterations to force sending data back to the client.For a use with API Gateway or Lambda Function URL you need to create the stream with the
CreateHttpStreampassing the status code and response headers.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.