aws-samples / aws-samples/serverless-patterns

New pattern submission - sam-dotnet-responsestreaming-bedrock-agent

Aperta
#3,237 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
1.8k
Fork
1.1k
Merge medio
7g 14h
PR unite (30g)
6

Descrizione

# 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:

https://github.com/aws-samples/serverless-patterns/pull/3236

## Author

- **Name:** Doug Perkes
- **Bio:** Senior Solutions Architect at AWS, focused on .NET and serverless.
- **LinkedIn:** dougperkes

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con la PR #3236 collegata, che contiene il modello, e verifica l’entry point della funzione Lambda e la relativa configurazione di deployment SAM. Il lavoro è completato quando il pattern dimostra lo streaming delle risposte .NET da Amazon Bedrock attraverso API Gateway fino al client, come descritto.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
aws, csharp
Ambito
api, backend, cloud
Tipo di issue
Funzionalità
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.