How AWS Bedrock Works
How AWS Bedrock works, for beginners, with real calls to Amazon Bedrock: why a model ID fails with 'on-demand throughput isn't supported' and the us. inference profile fixes it, why the model needs a system prompt, why it remembers nothing between calls, what tokens cost from the real price list, and how a guardrail blocks a question before the model runs.
One error, one answer
Your first call to Amazon Bedrock will probably fail with an error you don't understand. Change three letters, and it answers, for about a hundredth of a cent. Why?

We'll follow one parent's question all the way through Bedrock, from that error to the right answer: can we make up a missed lesson?

Ana teaches forty families piano, and she's building a chat assistant on Bedrock. If it answers wrong, a family loses a lesson they paid for.

What Bedrock is
Ben, Mia's dad, sends the first message. Before he gets any answer, it goes to Amazon Bedrock: an AWS service that runs AI models for you. You send text, a model writes text back, with no servers or model files of your own.

Bedrock has two sets of commands. One, called bedrock, is for setup: listing and configuring. The other, bedrock-runtime, is where you ask questions. Which models? Guess first: how many does the catalog hold? Ana asks the setup side: 126 models. Amazon's own, and models from OpenAI, Anthropic, Mistral, Meta and more. They're called foundation models: big, general models you use as they are.
aws bedrock list-foundation-models --query 'length(modelSummaries)'126
aws bedrock list-foundation-models --query 'modelSummaries[].providerName' --output text | tr '\t' '\n' | sort | uniq -c | sort -rn | head -621 Amazon 16 OpenAI 16 Anthropic 13 Stability AI 13 Mistral AI 7 Meta
Think of a music booking agency. Bedrock is the front desk, the models are its roster of performers, your AWS account is your account with the agency, and the bill is counted in tokens, small chunks of text about a word each. You pay by the word.
Before any model runs, AWS checks who's asking. Ana's laptop signs every request with her AWS keys. Then IAM, AWS's permission system, checks she's allowed to call that model. The keys in this lab can call Bedrock and read prices, nothing else.

And the call itself? Every maker's model expects its own request format. Bedrock's answer is one call named Converse. It takes one request shape, a list of messages, for any chat model in the catalog. Switch models, and only the model ID changes.

The model ID
Now the error from the start. One quick note first: a brand-new account may see a different message, saying it's still being verified. That happened on our own first call. It's normal, and it cleared on its own in about ten minutes.
mac:~$ aws bedrock-runtime converse --model-id amazon.nova-micro-v1:0 ...An error occurred (AccessDeniedException) when calling the Converse operation: Your account is currently being verified. Verification normally takes less than 2 hours. Until your account is verified, you may not have access to this operation. If you are still receiving this message after more than 2 hours, please let us know by writing to aws-verification@amazon.com. We appreciate your patience.
Ana's first test is a file with one question in it: how do makeup lessons work? She picks Amazon's small, cheap model, Nova 2 Lite. She sends the question to bedrock-runtime, the door where questions go, using the converse call. Error: this model can't be called directly. It wants an inference profile.
cat ask.json[ {"role": "user", "content": [{"text": "How do makeup lessons work?"}]} ]
M=amazon.nova-2-lite-v1:0
aws bedrock-runtime converse --model-id $M --messages file://ask.jsonaws: [ERROR]: An error occurred (ValidationException) when calling the Converse operation: Invocation of model ID amazon.nova-2-lite-v1:0 with on-demand throughput isn’t supported. Retry your request with the ID or ARN of an inference profile that contains this model.
Newer models like this one are only offered through an inference profile. That's one name that covers the same model in several Regions, AWS's data center locations. Ana works in Virginia. She puts us dot in front of the model ID and asks what it covers: the same model in Virginia, Ohio, and Oregon.
aws bedrock get-inference-profile --inference-profile-identifier us.$M --query 'models[].modelArn' --output text | tr '\t' '\n'arn:aws:bedrock:us-east-1::foundation-model/amazon.nova-2-lite-v1:0 arn:aws:bedrock:us-east-2::foundation-model/amazon.nova-2-lite-v1:0 arn:aws:bedrock:us-west-2::foundation-model/amazon.nova-2-lite-v1:0
So a question sent to Virginia can be answered in Oregon. AWS says so: Bedrock picks the Region.

Those are the three letters from the start. She sends the same question with the new ID, and saves the reply. Guess first: she asked how makeup lessons work. What did the model write about? Makeup. The cosmetics kind.
M=us.$M
aws bedrock-runtime converse --model-id $M --messages file://ask.json > reply.json
jq -r '.output.message.content[0].text' reply.json | head -5### **How Makeup Lessons Work** Makeup lessons are structured learning experiences designed to teach individuals how to apply makeup effectively, whether for personal use, professional settings (like film, theater, or photography), or specialized occasions (weddings, events, etc.). Here’s a breakdown of how makeup lessons typically work: ---
And it kept going. 52 tokens in, a thousand out, almost six seconds. Why did it stop? The stop reason says max tokens: it ran out of room, not out of things to say. You can set that limit lower.
jq '{usage, metrics, stopReason}' reply.json{ "usage": { "inputTokens": 52, "outputTokens": 1000, "totalTokens": 1052 }, "metrics": { "latencyMs": 5768 }, "stopReason": "max_tokens" }
What the model knows
So what does the model know about Ana's studio? Nothing. She has to tell it, in a system prompt: instructions sent along with every question. Thirty-minute lessons, makeups within thirty days, if you cancel a day ahead. Same question, and now the answer is about piano.
cat system.json[ {"text": "You answer parents for Ana's Piano Studio. Lessons are 30 minutes. A missed lesson can be made up within 30 days if the parent cancels at least 24 hours before. Answer in two sentences or fewer."} ]
aws bedrock-runtime converse --model-id $M --system file://system.json --messages file://ask.json | jq -r '.output.message.content[0].text'If you cancel at least 24 hours before Ana's Piano Studio lessons, you can make up a missed 30-minute lesson within 30 days.
One test setting first: temperature zero. It makes the model give the same answer every time. Next, Ben. Yesterday he told the assistant that Mia has piano on Tuesdays at four. Today Ben asks: what time is my daughter's lesson? The assistant doesn't know. It never saw yesterday. Bedrock keeps no memory between calls. That took 97 tokens in, because the system prompt rides along with every question.
cat ben-1.json[ {"role": "user", "content": [{"text": "What time is my daughter's lesson?"}]} ]
aws bedrock-runtime converse --model-id $M --system file://system.json --messages file://ben-1.json --inference-config temperature=0 | jq -r '.output.message.content[0].text, .usage.inputTokens'Ana's Piano Studio lessons are 30 minutes long, and it's important to cancel at least 24 hours in advance if you need to reschedule. Please contact the studio directly to confirm your daughter's specific lesson time. 97
So the app sends the whole conversation every time: Ben's first message, the assistant's reply, then the new question. Now it knows: Tuesdays at four. But look at the tokens in: 97 before, 133 now. Every turn of a chat is sent again, and paid for again.
cat ben-chat.json[ {"role": "user", "content": [{"text": "Hi, I'm Ben, Mia's dad. Mia has piano on Tuesdays at 4."}]}, {"role": "assistant", "content": [{"text": "Thanks, Ben! Mia is booked for Tuesdays at 4."}]}, {"role": "user", "content": [{"text": "What time is my daughter's lesson?"}]} ]
aws bedrock-runtime converse --model-id $M --system file://system.json --messages file://ben-chat.json --inference-config temperature=0 | jq -r '.output.message.content[0].text, .usage.inputTokens'Mia’s piano lesson is at 4 pm on Tuesdays. 133
By turn ten, one question drags nineteen messages along. Long chats cost more, so real apps trim old turns.

Tokens and the bill
What does that cost? A small script looks up AWS's price list. The screen shows the price per thousand tokens. For Nova 2 Lite in Virginia, per million, that's thirty-three cents for reading, and two seventy-five for writing. Writing costs eight times more.
./price.sh Nova2.0Lite-input-tokens$0.00033 per 1K tokens for USE1-Nova2.0Lite-input-tokens in US East (N. Virginia)
./price.sh Nova2.0Lite-output-tokens$0.00275 per 1K tokens for USE1-Nova2.0Lite-output-tokens in US East (N. Virginia)
So the thousand-token makeup essay cost about a quarter of a cent. Ben's short, correct answer costs a hundredth of a cent, the number from the start. Two hundred a week: under three cents.

Guardrails
Then Ben asks for a refund. Ana doesn't want a bot promising money back. Bedrock's answer is a guardrail: a checkpoint that reads the question before the model does, and reads the answer before Ana's app does.

Ana writes hers as a file. One denied topic: refunds. One rule for phone numbers: hide them. And the message parents see when something's blocked. One command creates it, and Bedrock gives it an ID and a version number. She keeps the ID as G, and both together as G R.
cat guardrail.json{ "name": "studio-assistant", "topicPolicyConfig": {"topicsConfig": [{ "name": "Refunds", "type": "DENY", "definition": "Requests for refunds, money back or billing disputes." }]}, "sensitiveInformationPolicyConfig": {"piiEntitiesConfig": [ {"type": "PHONE", "action": "ANONYMIZE"} ]}, "blockedInputMessaging": "Ana answers payment questions herself. She'll call you today.", "blockedOutputsMessaging": "Ana will answer this one herself." }
G=$(aws bedrock create-guardrail --cli-input-json file://guardrail.json --tags key=video,value=aws-bedrock-works --query guardrailId --output text); echo $Gcs6uiwb7t5jq
GR=guardrailIdentifier=$G,guardrailVersion=DRAFT
Ben's refund question goes through the guardrail. Guess first: how many tokens does the model read? Zero. The guardrail blocked it before the model ran, so Ben gets Ana's own message, and Ana pays the model nothing.
cat refund.json[ {"role": "user", "content": [{"text": "Mia missed two lessons in October. Can I get a refund for those?"}]} ]
aws bedrock-runtime converse --model-id $M --guardrail-config $GR --messages file://refund.json | jq '{text: .output.message.content[0].text, stopReason, usage}'{ "text": "Ana answers payment questions herself. She'll call you today.", "stopReason": "guardrail_intervened", "usage": { "inputTokens": 0, "outputTokens": 0, "totalTokens": 0 } }
That's the documented behavior: the guardrail checks both the question and the answer, and a blocked question never reaches the model.

Refunds and phone numbers are just two kinds of checks. A guardrail can also filter insults, or block exact words you choose.

And on the way out: Ana pastes replies into the family group chat, so phone numbers must never show up. Bedrock can run a guardrail by itself, on any text, with no model at all. She tests a draft reply, marked as an answer going out. The guardrail steps in, and the number becomes a placeholder.
cat draft.json[ {"text": {"text": "Got it, Ben! Ana will call you back at 555-201-0142 about Tuesday."}} ]
aws bedrock-runtime apply-guardrail --guardrail-identifier $G --guardrail-version DRAFT --source OUTPUT --content file://draft.json | jq -r '.action, .outputs[0].text'GUARDRAIL_INTERVENED Got it, Ben! Ana will call you back at {PHONE} about Tuesday.
The whole journey
Here's the whole trip. Ana's app signs the request, and AWS checks she's allowed. The guardrail reads the question, the profile picks a Region, and the model writes. The guardrail reads the answer, the tokens go on the bill, and nothing is kept for next time.

Bedrock also has Knowledge Bases, to answer from your own documents, and Agents, to take actions, both built on this same call. You won't need them on day one.

Ben's answer
Now Ben's real question, with everything on: the profile, the system prompt, the guardrail, and the whole chat. Ben writes: we cancelled Monday morning for Tuesday. Can Mia make it up? The answer: yes, within thirty days. 140 tokens in, 30 out, and end turn means it simply finished.
cat cancel.json[ {"role": "user", "content": [{"text": "Hi, I'm Ben, Mia's dad. Mia has piano on Tuesdays at 4."}]}, {"role": "assistant", "content": [{"text": "Thanks, Ben! Mia is booked for Tuesdays at 4."}]}, {"role": "user", "content": [{"text": "We cancelled on Monday morning for Tuesday. Can Mia make it up?"}]} ]
aws bedrock-runtime converse --model-id $M --guardrail-config $GR --system file://system.json --messages file://cancel.json --inference-config temperature=0 | jq -r '.output.message.content[0].text, .usage.inputTokens, .usage.outputTokens, .stopReason'Hi Ben, Mia can make up her missed lesson within the next 30 days since you cancelled more than 24 hours in advance. 140 30 end_turn
Ben books the makeup lesson, and it's exactly Ana's policy. The easy messages answer themselves, and refunds still go to her.

So: call newer models through a profile. Tell the model your rules every time. Send the whole chat, it remembers nothing. And put a guardrail on both sides.

If Bedrock makes more sense now, a like helps YouTube show this to more beginners, and subscribing brings more AWS explained this way.
The lab files and every command are linked in the description. Thanks for watching Cloud Explainers.
Sources
Demos: real output. Watch the full video on YouTube.