Why Choose Cloud-Via
You can call Claude or GPT directly via API, so why choose via AWS Bedrock or Google Vertex AI? The reason is ease of embedding into enterprise systems.
Cloud-Via Merits
- Security/compliance: data stays within AWS/GCP. Integrated into internal rules via VPC/IAM
- Billing integration: rolls into existing AWS/GCP billing. Easier for accounting too
- Geographic constraints: can specify data location country (cases requiring in-EU processing)
- SLA / support: if you have an enterprise contract, the responsibility boundary rides on the existing contract
- Multi-model: try multiple models like Claude, Llama, Titan, Mistral with the same API
3 Main Platforms
| AWS Bedrock | Google Vertex AI | Azure AI Foundry | |
|---|---|---|---|
| Claude | ○ | ○ | — |
| Gemini | — | ◎ | — |
| GPT | — | — | ◎ |
| Llama | ○ | ○ | ○ |
| Pricing | Usage + Provisioned Throughput | Usage | Usage + PTU |
Calling Claude on AWS Bedrock
1. Request Model Access
AWS Console → Bedrock → Model access → check Claude models → send request (approved in minutes to hours)
2. Set IAM Permissions
Grant the IAM user bedrock:InvokeModel permission
3. Code Example (Node.js)
import { BedrockRuntimeClient, InvokeModelCommand }
from "@aws-sdk/client-bedrock-runtime";
const client = new BedrockRuntimeClient({ region: "us-east-1" });
const body = JSON.stringify({
anthropic_version: "bedrock-2023-05-31",
max_tokens: 1024,
messages: [{ role: "user", content: "Things to see in Tokyo?" }],
});
const response = await client.send(new InvokeModelCommand({
modelId: "anthropic.claude-opus-4-5-v1:0",
body,
}));
const json = JSON.parse(new TextDecoder().decode(response.body));
console.log(json.content[0].text);
Calling Gemini on Google Vertex AI
1. Project Prep
GCP → Vertex AI → Enable
2. Authentication
gcloud auth application-default login for local auth
3. Code Example
import { VertexAI } from "@google-cloud/vertexai";
const vertex = new VertexAI({
project: "your-project",
location: "us-central1",
});
const model = vertex.getGenerativeModel({
model: "gemini-2.5-pro",
});
const result = await model.generateContent("Things to see in Tokyo?");
console.log(result.response.text());
Abstract with Vercel AI SDK
The Vercel AI Gateway is handy for cross-cloud code unification:
import { generateText } from "ai";
import { gateway } from "@ai-sdk/gateway";
// Specify by string without minding provider/base differences
await generateText({
model: "anthropic/claude-opus-4-5", // uses Bedrock-via behind the scenes
prompt: "...",
});
How to Choose
- Already on AWS & want Claude → Bedrock
- On GCP & Gemini-centric → Vertex AI
- Azure & GPT-centric → Azure AI Foundry
- Startup/personal dev → Anthropic / OpenAI directly suffices
Cautions
- Feature gap: Bedrock's Claude may lag the direct API in features (Computer Use, etc.)
- Price difference: cloud-via adds a bit. In exchange, fixed pricing via Provisioned Throughput
- Region restriction: regions where models are available are limited



