New Pattern Submission — sam-dotnet-responsestreaming-bedrock
Pattern Details
- Title: Lambda Response Streaming with Amazon Bedrock — Story Generator (.NET)
- Description: Stream LLM-generated story text token-by-token from Amazon Bedrock through Lambda response streaming and API Gateway to the client.
- Language: .NET (C#)
- Framework: SAM
- Level: 200
- Services: AWS Lambda, Amazon API Gateway, Amazon Bedrock
How It Works
This pattern deploys a Lambda function that invokes Amazon Bedrock (Claude Sonnet) via the ConverseStream API and pipes generated tokens directly through API Gateway response streaming to the client.
The user specifies a genre, setting, and theme via query parameters, and the story appears word-by-word in the terminal. First tokens arrive within seconds — no waiting for the full generation to complete.
This demonstrates end-to-end streaming from Bedrock through Lambda to the client using the .NET response streaming SDK (LambdaResponseStreamFactory.CreateHttpStream).
GitHub PR for template:
Author
- Name: Doug Perkes
- Bio: Senior Solutions Architect at AWS, focused on .NET and serverless.
- LinkedIn: dougperkes
New Pattern Submission — sam-dotnet-responsestreaming-bedrock
Pattern Details
How It Works
This pattern deploys a Lambda function that invokes Amazon Bedrock (Claude Sonnet) via the ConverseStream API and pipes generated tokens directly through API Gateway response streaming to the client.
The user specifies a genre, setting, and theme via query parameters, and the story appears word-by-word in the terminal. First tokens arrive within seconds — no waiting for the full generation to complete.
This demonstrates end-to-end streaming from Bedrock through Lambda to the client using the .NET response streaming SDK (LambdaResponseStreamFactory.CreateHttpStream).
GitHub PR for template:
Author