pleach
Integrate

@pleach/transport-bedrock

First-party AWS Bedrock transport for cloud-routed Pleach runtimes — STS-federated credentials, region pinning, and Bedrock-specific cost-event emission.

Not yet published. @pleach/transport-bedrock is marked private in this monorepo and is not on npm — npm install @pleach/transport-bedrock will not resolve today. This page documents the planned surface; the package publishes in a later cut.

@pleach/transport-bedrock is the AWS Bedrock route for a Pleach session whose contract clause forbids direct provider API keys. It implements the AgentProvider interface from @pleach/core against the Bedrock Runtime API, so the family is still anthropic, openai, or whichever model the buyer cleared — only the transport changes. The canonical use case is a regulated buyer reaching Claude (or any Bedrock-hosted family) through their own VPC endpoint, with the call recorded on the runtime ledger and reconcilable to the AWS bill.

What it provides

  • An AgentProvider implementation against the Bedrock Runtime API per the cloud-routed-agent.mdx transport-vs-family split.
  • Static AWS keys or an STS session token today (accessKeyId + secretAccessKey, optional sessionToken); container/role-assumption resolution (fromContainerMetadata / credentialProvider callback) is planned for a follow-on minor, per the IAM-federated credentials section of cloud-routed-agent.mdx.
  • Region pinning at the endpoint URL, with the cloud as the enforcement authority (cloud-routed-agent.mdx: region as a hard constraint).
  • Bedrock-specific cost-event emission so the harness_auditable_calls row carries the cloud, region, and model dimensions the AWS billing detail rolls up by — see the reconciliation SQL in cloud-routed-agent.mdx.

Where it fits

@pleach/transport-bedrock plugs into the same provider slot on SessionRuntime that AiSdkProvider and AnthropicSdkProvider fill — it satisfies the AgentProvider contract documented in Providers. For the architectural shape of a Bedrock-routed deployment — transport-vs-family, IAM federation, region as a hard constraint, cost reconciliation — see Cloud-routed agent.

Install

npm install @pleach/transport-bedrock

API surface

The createBedrockProvider factory signature, the credential and region option shape, the defaultable model id field, and the emitted cost-event payload all live on the package's npm page: @pleach/transport-bedrock. This page is placement orientation — what the SKU is for and where it slots into the substrate. The npm README is the source of truth for the constructor and option shapes; if a claim here disagrees with the published README, the README wins.

Where to go next

On this page