Skip to main content

Amazon Bedrock logoAmazon Bedrock

Amazon Bedrock is available through the AI SDK. Install the provider package to use their models with Mastra.

For detailed provider-specific documentation, see the AI SDK Amazon Bedrock provider docs.

Amazon Bedrock isn't a model router provider, so model strings like amazon-bedrock/<model> don't resolve. Pass a model instance from @ai-sdk/amazon-bedrock to the agent's model option instead.

To use Bedrock models through a model router string, use the full ID that LLM Gateway lists, including its provider prefix, for example llmgateway-providers/aws-bedrock/claude-opus-4-6. Dropping the llmgateway-providers/ prefix leaves an ID that doesn't resolve.

To use this provider with Mastra agents, see the Agent Overview documentation.

Installation
Direct link to Installation

npm install @ai-sdk/amazon-bedrock
On this page