Cloud Explainers
Home › AWS

Amazon Bedrock vs OpenRouter: Which One Should You Use?

AWS8 min video

Amazon Bedrock vs OpenRouter for beginners: both put many AI models behind one API, but Bedrock runs them inside your AWS account (IAM permissions, AWS logs and bill) while OpenRouter is a separate company that forwards your request to whichever provider hosts the model (one key, hundreds of models, fallbacks when one is busy). Real calls: OpenRouter's free models, a real 429 and a fallback, and Bedrock's Converse request on Floci, a local AWS emulator.

Two doors

Your app needs AI models. Two ways in: Amazon Bedrock, and OpenRouter. Two questions decide it: where may your data go, and how many models will you try?

Bedrock or OpenRouter?: diagram of your app, Amazon Bedrock, OpenRouter, AI models

Dave is building an AI assistant for the mechanics at a small airplane hangar. Its records run on AWS, and can't go just anywhere. Beth, the owner, asks: which door?

Beth's hangar: diagram of torque wrench, the assistant, shop manual

First, what they share. Each one is a gateway: your app sends one request, and the gateway hands it to a model, from makers like Anthropic, Meta or Mistral.

What they share: one gateway, many models: diagram of your app, the gateway, Anthropic, Meta, Mistral

Guess first: how many accounts does Dave need? Just one. The gateway holds the accounts with each model maker, and every answer comes back to Dave in the same format.

One gateway: one account: comparison table of Without a gateway vs With a gateway, Accounts, Keys to keep, Bills, Answers

The difference is who runs the gateway. Amazon Bedrock is an AWS service: the models run inside AWS, and you reach them through your AWS account. OpenRouter is a separate company. It forwards your request to a provider, the company whose computers actually run the model. So there's one more company in the middle.

Same question, two different roads: diagram of Dave's assistant, Amazon Bedrock, the model, OpenRouter, a provider, Dave's AWS account

Think of how the hangar orders parts. The airport's parts counter bills the hangar's account, under the airport's rules. A parts broker can get a part from almost any supplier, on one invoice, but now there's a broker in between.

One key, any model

How much work is it to call a model through OpenRouter, and who actually answers? The request is a small file: the model, written as maker, slash, model, and the question. He sets the web address, and attaches his OpenRouter key, a secret string that proves the request is his. It stays in a variable, never on screen. Then he sends it with curl, a tool for web requests. The reply says who answered: Baidu's free model.

Dave's laptop: ~/assistant
cat ask.json{
  "model": "baidu/ernie-5.5-flash-preview:free",
  "max_tokens": 400,
  "messages": [
    {"role": "user",
     "content": "In two short sentences: why do mechanics use a torque wrench on wheel nuts?"}
  ]
}
Dave's laptop: ~/assistant
OR=https://openrouter.ai/api/v1; H="Authorization: Bearer $OPENROUTER_API_KEY"
Dave's laptop: ~/assistant
curl -s $OR/chat/completions -H "$H" -d @ask.json > reply.json
Dave's laptop: ~/assistant
jq '{model, provider}' reply.json{
  "model": "baidu/ernie-5.5-flash-preview:free",
  "provider": "Baidu"
}

Here's the answer itself, about torque wrenches on wheel nuts. And notice the shape of that request: a model, and a list of messages. It's the same shape OpenAI uses for ChatGPT's models, so if you already have code for OpenAI, you only change the address.

Dave's laptop: ~/assistant
jq -r '.choices[0].message.content' reply.jsonMechanics use a torque wrench to tighten wheel nuts to the manufacturer's specified torque, ensuring each nut is secured evenly without being over- or under-tightened. This prevents wheel wobble or loosening and avoids warping the brake rotors or damaging the studs.

How many models sit behind that one address? Dave asks it: 476. To try a different one, he changes one line in the file. Same key, same address, and now Nvidia's model answers.

Dave's laptop: ~/assistant
curl -s https://openrouter.ai/api/v1/models | jq '.data | length'476
Dave's laptop: ~/assistant
diff ask.json ask-switch.json2,3c2,3
<   "model": "baidu/ernie-5.5-flash-preview:free",
<   "max_tokens": 400,
---
>   "model": "nvidia/nemotron-3.5-lightning:free",
>   "max_tokens": 600,
Dave's laptop: ~/assistant
curl -s $OR/chat/completions -H "$H" -d @ask-switch.json | jq -r '.model, .provider'nvidia/nemotron-3.5-lightning:free
Nvidia

And the bill? This call cost zero, because free models are free. For paid models, you prepay OpenRouter in credits, and it takes five and a half percent when you buy them.

Dave's laptop: ~/assistant
jq '.usage | {prompt_tokens, completion_tokens, cost}' reply.json{
  "prompt_tokens": 41,
  "completion_tokens": 75,
  "cost": 0
}

Models bill by tokens, small chunks of words, counted in and out. Dave asks OpenRouter's catalog for Claude Sonnet 4.5: three dollars per million tokens in, and fifteen out. The same price Anthropic lists, passed straight through.

Dave's laptop: ~/assistant
curl -s $OR/models | jq '.data[] | select(.id == "anthropic/claude-sonnet-4.5") | .pricing | {prompt, completion}'{
  "prompt": "0.000003",
  "completion": "0.000015"
}

That's from OpenRouter's own FAQ: the fee is on buying credits, not on each model's price.

One key, any model: browser screenshot from the video

How far does free go? Fifty requests a day, at most twenty a minute. Buy ten dollars of credits once, and it's a thousand a day.

One key, any model: figure of 50 free requests a day on OpenRouter, source: openrouter.ai/docs/api-reference/limits

But these are free models, shared by everyone using them. Dave asks Google's free Gemma model the same question. Guess first: an answer, or an error? An error: four twenty-nine, too many requests. Not Dave's limit: the free pool at the provider is shared, and right now it's busy. A real assistant can't just stop there.

Dave's laptop: ~/assistant
curl -s $OR/chat/completions -H "$H" -d @ask-busy.json | jq '.error | {code, message}'{
  "code": 429,
  "message": "Provider returned error"
}

So OpenRouter takes a list instead of one model. Gemma first, Baidu's model second. Same request, and this time an answer comes back, from the second model on the list.

Dave's laptop: ~/assistant
jq '.models' ask-fallback.json[
  "google/gemma-4-31b-it:free",
  "baidu/ernie-5.5-flash-preview:free"
]
Dave's laptop: ~/assistant
curl -s $OR/chat/completions -H "$H" -d @ask-fallback.json | jq -r '.model, .provider'baidu/ernie-5.5-flash-preview:free
Baidu

OpenRouter's docs say it plainly: if the first model returns an error, it tries the next one.

One key, any model: browser screenshot from the video

And that one key is the whole lock. Anyone holding it can spend from Dave's account. So OpenRouter lets you cap each key: Dave's has a limit of zero dollars, which is why only free models answer it.

Dave's laptop: ~/assistant
curl -s $OR/key -H "$H" | jq '.data | {limit, usage}'{
  "limit": 0,
  "usage": 0
}

Your AWS account

Now Bedrock. What changes when the gateway lives inside your own AWS account? First, a note: our lab has no Bedrock account, so Floci, a stand-in that imitates AWS, plays its part. The request is the real Bedrock one, but Floci passes it to a free model, so the words that come back aren't Claude's. There's no OpenRouter key here. Dave signs in as an AWS user, with AWS keys and a region, the group of AWS data centers his requests go to.

Dave's laptop: Bedrock on Floci, an AWS emulator
aws sts get-caller-identity --query Arn --output textarn:aws:iam::000000000000:user/dave
Dave's laptop: Bedrock on Floci, an AWS emulator
aws configure listNAME       : VALUE                    : TYPE             : LOCATION
profile    : <not set>                : None             : None
access_key : ****************8G2S     : shared-credentials-file :
secret_key : ****************x7xG     : shared-credentials-file :
region     : us-east-1                : config-file      : ~/.aws/config

Which models can Dave call? Bedrock has its own catalog, listed per region. Floci's copy here lists one Anthropic model, the real one lists more. Many models work on first use, but older Anthropic models first need a one-time form in your account.

Dave's laptop: Bedrock on Floci, an AWS emulator
aws bedrock list-foundation-models --by-provider anthropic --query 'modelSummaries[].modelId'[
    "anthropic.claude-sonnet-4-5-20250929-v1:0"
]

Bedrock names each model with an ID, like this one for Claude Sonnet. The question goes in its own message file. Then one call to Converse, Bedrock's single request shape for every chat model. The answer comes back, with the tokens counted in and out, which is what Bedrock bills you for.

Dave's laptop: Bedrock on Floci, an AWS emulator
M=anthropic.claude-sonnet-4-5-20250929-v1:0
Dave's laptop: Bedrock on Floci, an AWS emulator
aws bedrock-runtime converse --model-id $M --messages file://msg.json --inference-config maxTokens=400 > breply.json
Dave's laptop: Bedrock on Floci, an AWS emulator
jq -r '.output.message.content[0].text' breply.jsonThey use it to tighten wheel nuts to the manufacturer’s exact torque spec, ensuring even clamping force. This prevents loose wheels or over-tightened studs that could damage the wheel or lead to failure.
Dave's laptop: Bedrock on Floci, an AWS emulator
jq '.usage' breply.json{
  "inputTokens": 41,
  "outputTokens": 88,
  "totalTokens": 129
}

AWS's guide: Converse works with every Bedrock model that takes messages, and calling it needs one permission: bedrock InvokeModel.

Your AWS account: browser screenshot from the video

Side by side, the difference is how you prove who you are. OpenRouter wants one key, sent to one web address. Bedrock wants your AWS sign-in, for one region, and a model ID from its catalog. Both answered the same question.

The same question, two requests: comparison table of OpenRouter vs Amazon Bedrock, Question, Sent to, Who you are, Needs, Model, Tool, Region, Answer

That permission is the point. In a real AWS account, permissions live in IAM. A policy like this one says who may call which model. Here, that's Anthropic's models, in one region. Every call is signed with that user's keys, and AWS can log who called what. The stand-in doesn't check it, so we only show the policy.

Dave's laptop: Bedrock on Floci, an AWS emulator
cat invoke-policy.json{
  "Version": "2012-10-17",
  "Statement": [{
    "Effect": "Allow",
    "Action": "bedrock:InvokeModel",
    "Resource": "arn:aws:bedrock:us-east-1::foundation-model/anthropic.*"
  }]
}

There's one more difference here. An app running on AWS doesn't need a stored key at all. It can run under a role, which is AWS's way of granting permissions to the app itself, and AWS hands it short-lived keys that expire on their own. With OpenRouter, the server keeps one long-lived key, and you guard it.

A stored key, or a role: diagram of app on AWS, short-lived keys, app with OpenRouter, long-lived key

Data and the bill

So here's the first of the two questions: where may your data go? Dave's assistant will see the hangar's maintenance notes. With Bedrock, the question stays inside AWS, under the account Beth already has. With OpenRouter, it travels to OpenRouter, then on to the provider that runs the model. OpenRouter says it doesn't log prompts by default, but each provider has its own rules. Guess first: which is easier to explain to an auditor? Bedrock: one company, one account.

Question one: where may your data go?: diagram of maintenance notes, Bedrock, OpenRouter, the provider, Beth's AWS account

AWS says it directly: the model makers don't get access to your prompts and completions on Bedrock.

Data and the bill: browser screenshot from the video

The second question: how many different models do you need to try, and how quickly do you want to switch? Bedrock bills per million tokens in and out, on the same AWS bill as everything else. OpenRouter charges the provider's own price, from prepaid credits. What OpenRouter adds is reach: hundreds of models with one key, with free ones to start.

Question two: how many models to try?: comparison table of Amazon Bedrock vs OpenRouter, Matters if, Switching, You pay, Bill, Billed on, Price, Reach, To start

Which one

So, two questions. If your data must stay in AWS, or your company already runs there, use Bedrock. You already know its permissions, its logs and its bill. If you want to try many models fast, switch with one line, or fall back to another model when one is busy, use OpenRouter.

Which one should you use?: comparison table of Amazon Bedrock vs OpenRouter, Data must stay in AWS, Company on AWS, Who may call it, Logs and bill, Try many models fast, Switch a model, Fall back when busy

Dave tells Beth: the hangar's records already live in AWS, so the assistant runs on Bedrock. And on his laptop, he keeps OpenRouter for trying new models first.

Bedrock for the hangar: diagram of Bedrock, OpenRouter: tests

Recap

So: both are gateways to many models. Bedrock keeps it in your AWS account. OpenRouter gives you every model behind one key, and a fallback when one is busy.

Bedrock vs OpenRouter: cards of Both: one gateway, Bedrock, OpenRouter, Fallbacks

If this made the choice easier, subscribing brings more side-by-sides like it.

The lab files and every command are linked in the description. Thanks for watching Cloud Explainers.

Sources

Demos: Docker containers on our own Mac standing in for a laptop and for Amazon Bedrock (Floci, a local AWS emulator); the hangar and its people are made up. Every command and output was real. Watch the full video on YouTube.

More videos

Go (Golang)5 min

Golang Channels (chan) in 5 Minutes

Homelab & self-hosting21 min

Tailscale: Full Tutorial for Beginners

LLM infrastructure9 min

How RAG Works

Git11 min

Every Git Setting to Change on Day One

Linux9 min

WSL vs a Linux Virtual Machine: Which One Should You Use?

PostgreSQL9 min

Every PostgreSQL Setting to Change After You Install It

Docker9 min

What Happens When You Install Docker on Ubuntu

Python8 min

How to Fix Python 'Address Already in Use' Errors

Go (Golang)5 min

Golang Interfaces and Mocks in 5 Minutes

Git7 min

How to Fix Git 'Detached HEAD' State

Linux21 min

Linux Firewall with ufw: Full Tutorial for Beginners

Go (Golang)5 min

Golang defer Statements in 5 Minutes

Auth (OAuth, JWT)9 min

How to Fix OAuth 'invalid_grant' Errors

Databases & SQL11 min

The SQL Roadmap for Beginners

Go (Golang)5 min

Golang make() for Slices and Maps in 5 Minutes

Networking7 min

How to Fix Network 'No Route to Host' Errors on Linux

Linux6 min

How to Fix Linux 'Too Many Open Files' Errors

Django (Python web framework)11 min

Every Django Concept a Beginner Needs to Know

Linux24 min

SSH on Linux: Full Tutorial for Beginners

Go (Golang)5 min

Golang for range Loops in 5 Minutes

Databases & SQL10 min

SQL Databases: SQLite vs PostgreSQL

Django (Python web framework)10 min

The Django Roadmap for Beginners

Go (Golang)5 min

Golang Structs in 5 Minutes

Caching & Redis22 min

Redis: Full Tutorial for Beginners

Go (Golang)5 min

Golang context.Context in 5 Minutes

Databases & SQL7 min

How to Fix MySQL Database Error 1045: Access Denied for User

Go (Golang)5 min

Golang Method Receivers in 5 Minutes

Python8 min

How to Fix Python SSL: CERTIFICATE_VERIFY_FAILED Errors

Django (Python web framework)9 min

How to Fix Django Static Files Not Loading in Production

OpenRouter (one API for many AI models)8 min

OpenRouter vs Direct API Keys: Which One Should You Use?

Go (Golang)5 min

Golang if err != nil Checks in 5 Minutes

Go (Golang)8 min

How to Fix Golang 'go.mod File Not Found' Errors

AI agents & MCP22 min

MCP Servers: Full Tutorial for Beginners

Go (Golang)5 min

Golang Error Return Values in 5 Minutes

Python8 min

How to Fix Python ModuleNotFoundError: No Module Named

Go (Golang)5 min

Golang Pointers in 5 Minutes

Kubernetes8 min

How to Fix a Kubernetes Pod Stuck in CrashLoopBackOff

Homelab & self-hosting9 min

How to Fix a Homelab ESXi Host Not Responding

PostgreSQL24 min

PostgreSQL: Full Tutorial for Beginners

Load balancing & Nginx9 min

How a Load Balancer Works with HAProxy

Python9 min

How Python Virtual Environments Work

Homelab & self-hosting9 min

How to Fix Cloudflare Tunnel Errors in a Homelab

APIs9 min

How to Fix API CORS Errors: No 'Access-Control-Allow-Origin'

Auth (OAuth, JWT)9 min

How Authenticator App Login Codes Work (TOTP)

Git22 min

Git and GitHub: Full Tutorial for Beginners

Homelab & self-hosting10 min

How a Homelab Hypervisor Works (VMware ESXi)

Kubernetes9 min

How to Fix Kubernetes ImagePullBackOff Errors

DNS8 min

How to Fix DNS 'Temporary Failure in Name Resolution' on Linux

AWS8 min

How to Fix AWS CLI 'Unable to Locate Credentials'

Homelab & self-hosting10 min

Proxmox vs ESXi for Your Homelab: When Each One Wins

PostgreSQL10 min

PostgreSQL UUID vs Auto Increment: Which Primary Key Should You Use?

Kubernetes21 min

Kubernetes: Full Tutorial for Beginners

Networking9 min

How TCP Sockets Work

PostgreSQL7 min

How to Fix PostgreSQL 'Could Not Connect to Server'

Claude & the Claude Developer Platform9 min

Claude Code Hooks Will Finally Make Sense After This

DevOps & CI/CD9 min

DevOps with Ansible Will Finally Make Sense After This

Networking9 min

How SNMP Network Monitoring Works

Git8 min

How to Fix GitHub 'Permission Denied (publickey)' Errors

Docker21 min

Docker: Full Tutorial for Beginners

PostgreSQL7 min

How to Fix PostgreSQL 'Password Authentication Failed'

Linux8 min

Why One Linux Server Handles More Users Than You Think

Networking7 min

How to Fix Network 'Connection Refused' Errors

DevOps & CI/CD9 min

DevOps Pipelines: Jenkins vs GitHub Actions

Linux11 min

Linux Nginx Reverse Proxy: Full Tutorial for Beginners

Networking11 min

Every Networking Term a Beginner Needs in 12 Minutes

Docker6 min

How to Fix Docker 'Permission Denied' on docker.sock

Git7 min

How to Fix Git 'Updates Were Rejected' When You Push

Linux7 min

How to Fix nginx 502 Bad Gateway Errors on Linux

Linux8 min

How to Fix Linux apt 'Could Not Get Lock' Errors (Ubuntu)

Networking9 min

How Email Works on the Internet (SMTP) in 10 Minutes

Python8 min

The Python Roadmap for Beginners

Go (Golang)21 min

Golang REST API with Gin: Full Tutorial for Beginners

Networking10 min

How a WireGuard VPN Network Works

Linux9 min

Linux Makefiles Will Finally Make Sense After This

Auth (OAuth, JWT)9 min

SAML vs OAuth vs OpenID Connect: What's the Difference?

Python7 min

How to Fix Python cron Jobs That Never Run

Linux22 min

Linux Bash Scripting: Full Tutorial for Beginners

Networking10 min

How PXE Network Boot Works

Active Directory9 min

How Active Directory Works

Linux10 min

How to Fix a Linux systemd Service That Won't Start

Linux9 min

Linux Logs: syslog vs journald

Auth (OAuth, JWT)9 min

JWT vs Session Cookies: Which One Should You Use?

Docker10 min

Docker vs Docker Compose: Which One Should You Use?

Docker9 min

How to Fix Docker Compose Containers That Can't Talk to Each Other

Django (Python web framework)22 min

Django Full Tutorial for Beginners

Linux9 min

How Linux systemd Works

Networking8 min

How to Fix 'Windows Cannot Access' Network Share Errors (SMB)

APIs10 min

REST vs gRPC: Which One Should You Use?

Certificates & PKI (ADCS)9 min

How to Fix SSL Certificate Chain Errors (Missing Intermediate)

Python9 min

Every Python Concept for Beginners in 10 Minutes

Databases & SQL9 min

Every SQL Join Type in 10 Minutes

OpenRouter (one API for many AI models)9 min

Why OpenRouter Free Models Hit Their Limit So Fast

Gemini API & Google AI Studio9 min

Why Your Gemini API Free Tier Runs Out So Fast

OpenRouter (one API for many AI models)10 min

OpenRouter Will Finally Make Sense After This

Caching & Redis10 min

How Redis Caching Works

Gemini API & Google AI Studio10 min

Gemini API vs Vertex AI: Which One Should You Use?

Gemini API & Google AI Studio8 min

How to Fix a Leaked Gemini API Key

Go (Golang)9 min

Why Golang Uses Goroutines Instead of Threads

Gemini API & Google AI Studio9 min

How to Fix Gemini API Error 429: Resource Exhausted

Claude & the Claude Developer Platform10 min

Claude Token Pricing Will Finally Make Sense After This

Python11 min

Why Python Web Scraping Returns Nothing (and the Fix)

Python22 min

Python Automation: Full Tutorial for Beginners

Auth (OAuth, JWT)9 min

How OAuth Login Works

Python10 min

Python uv vs pip: Which One Should You Use?

Gemini API & Google AI Studio10 min

Google AI Studio Will Finally Make Sense After This

Docker10 min

What Happens When You Run a Docker Container

Claude & the Claude Developer Platform8 min

How to Fix Claude Code Billing Your API Key Instead of Your Plan

Auth (OAuth, JWT)9 min

Why Passkeys Can't Be Phished Like Passwords

PowerShell10 min

PowerShell vs Bash: Which One Should You Learn?

Linux10 min

The Linux Roadmap for Beginners

Django (Python web framework)9 min

Django vs FastAPI: Which One Should You Use?

Databases & SQL10 min

Why SQLite Is the Most Used Database in the World

Databases & SQL11 min

How a NoSQL Database Like MongoDB Works

Python11 min

How to Fix Python pip error: externally-managed-environment

Databases & SQL9 min

How to Fix MySQL Too Many Connections Database Errors

Go (Golang)9 min

Golang Concurrency Will Finally Make Sense After This

AWS10 min

How Amazon S3 Works

Kubernetes10 min

How Kubernetes Works

Git10 min

How Git Works

Docker10 min

How to Fix Docker Port Already Allocated Errors

PostgreSQL10 min

How PostgreSQL Works

Git8 min

How to Fix Git Merge Conflicts

Linux9 min

How to Fix No Space Left on Device in Linux

Networking10 min

How the Internet Works

Databases & SQL9 min

SQL vs NoSQL: When Each One Wins

Auth (OAuth, JWT)8 min

How to Fix JWT Token Expired Errors (401 Unauthorized)

Claude & the Claude Developer Platform9 min

Claude API vs Claude Pro: Why Your Subscription Doesn't Include It

AI agent skills9 min

Why AI Agent Skills Beat Giant Prompts

Linux10 min

Linux Cron Jobs Will Finally Make Sense After This

Cybersecurity10 min

Security Logs Will Finally Make Sense After This

Cybersecurity8 min

How to Fix a Security Leak: An API Key Pushed to GitHub

DNS9 min

DNS Will Finally Make Sense After This

Cybersecurity9 min

Never Ignore a Security Update

Auth (OAuth, JWT)9 min

Two-Factor Authentication Will Finally Make Sense

Networking8 min

Never Expose a Database to the Internet

Cybersecurity10 min

SSH Keys vs Passwords: Which Is Safer for Security?

Linux10 min

The 5 Levels of Linux Boot: From Power On to Login

Networking12 min

The 5 Levels of Network Firewalls

Cybersecurity10 min

Password Security: Why Hackers Crack Weak Passwords

Linux9 min

Why Your Linux Server Runs Out of Memory

Networking10 min

HTTP vs HTTPS: What Actually Changes on Your Network

Linux12 min

Every Linux File Permission You Need to Know

Linux10 min

Linux Processes vs Threads: When Each One Wins

Networking11 min

The OSI Model Will Finally Make Sense After This

Git11 min

The 7 Levels of Git

Networking10 min

Every Network Troubleshooting Command You Need

Cybersecurity10 min

Hashing vs Encryption in Cybersecurity: When Each One Wins

Networking11 min

Why the Internet Ran Out of IP Addresses

Linux11 min

Linux Package Managers: apt vs Snap vs Flatpak

Python9 min

Why Python Is Slow (and When It Doesn't Matter)

Networking11 min

TCP vs UDP: When Each One Wins

Linux8 min

Stop Running Linux as Root (Do This Instead)

Linux11 min

Linux Users and Groups Will Finally Make Sense

Cybersecurity9 min

Why Phishing Beats Good Security (and How to Spot It)

Docker12 min

The 7 Levels of Docker

AI agents & MCP12 min

AI Agents Will Finally Make Sense After This

Git8 min

Stop Using git push --force (Use This Instead)

AI agent skills10 min

Agent Skills vs MCP: When Each One Wins

Networking12 min

Networking Will Finally Make Sense After This

Linux12 min

Every Linux Command You Actually Need

Cybersecurity12 min

The 7 Levels of Cybersecurity

System design12 min

Every System Design Concept You Need, in One Diagram

PostgreSQL10 min

Why PostgreSQL Ignores Your Index