Amazon 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.
InstallationDirect link to Installation
- npm
- pnpm
- Yarn
- Bun
npm install @ai-sdk/amazon-bedrock
pnpm add @ai-sdk/amazon-bedrock
yarn add @ai-sdk/amazon-bedrock
bun add @ai-sdk/amazon-bedrock