File: aws-bedrock-stream.md | Updated: 11/15/2025
Menu
v5 (Latest)
AI SDK 5.x
Model Context Protocol (MCP) Tools
AWSBedrockAnthropicMessagesStream
Copy markdown
===========================================================================================================
AWSBedrockStream has been removed in AI SDK 4.0.
AWSBedrockStream is part of the legacy AWS Bedrock integration. It is not compatible with the AI SDK 3.1 functions.
The AWS Bedrock stream functions are utilties that transform the outputs from the AWS Bedrock API into a ReadableStream. It uses AIStream under the hood and handle parsing Bedrock's response.
import { AWSBedrockStream } from "ai"
AWSBedrockResponse
The response object returned from AWS Bedrock.
AWSBedrockResponse
AsyncIterable<{ chunk?: { bytes?: Uint8Array } }>
An optional async iterable of objects containing optional binary data chunks.
AIStreamCallbacksAndOptions
An object containing callback functions to handle the start, each token, and completion of the AI response. In the absence of this parameter, default behavior is implemented.
AIStreamCallbacksAndOptions
() => Promise<void>
An optional function that is called at the start of the stream processing.
(completion: string) => Promise<void>
An optional function that is called for every completion. It's passed the completion as a string.
(completion: string) => Promise<void>
An optional function that is called once when the stream is closed with the final completion message.
(token: string) => Promise<void>
An optional function that is called for each token in the stream. It's passed the token as a string.
A ReadableStream.
On this page
Deploy and Scale AI Apps with Vercel.
Vercel delivers the infrastructure and developer experience you need to ship reliable AI-powered applications at scale.
Trusted by industry leaders: