// STATUS: UNVERIFIED — no cloud credentials in this atlas; snippet follows official docs verbatim-ish // Source: https://platform.claude.com/docs/en/build-with-claude/claude-in-amazon-bedrock (retrieved 2026-09-18) // Install: npm install @anthropic-ai/bedrock-sdk // Auth: standard AWS credential chain; region from AWS_REGION (SDK defaults to us-east-1, does not read ~/.aws/config). import { AnthropicBedrockMantle } from "@anthropic-ai/bedrock-sdk"; const client = new AnthropicBedrockMantle({ awsRegion: process.env.AWS_REGION ?? "us-east-1", }); const message = await client.messages.create({ model: "anthropic.claude-haiku-4-5", // cheapest Haiku 4.5 id on the Bedrock Messages-API endpoint max_tokens: 8, messages: [{ role: "user", content: "Reply with OK." }], }); const textBlock = message.content.find((block) => block.type === "text"); if (textBlock && textBlock.type === "text") console.log(textBlock.text); // Legacy InvokeModel path (not run here): // import AnthropicBedrock from "@anthropic-ai/bedrock-sdk"; // new AnthropicBedrock({ awsRegion: "us-west-2" }).messages.create({ // model: "us.anthropic.claude-haiku-4-5-20251001-v1:0", max_tokens: 8, // messages: [{ role: "user", content: "Reply with OK." }] });