Amazon Bedrock: one API for foundation models, knowledge bases, agents and guardrails
The model catalogue by provider, InvokeModel versus Converse, the inference parameters, Knowledge Bases, Agents, Guardrails, fine-tuning and continued pre-training, model evaluation, Prompt Management and Flows, logging, the pricing modes and the security model, in one place.
On this page
Almost every generative AI question on the AIF-C01 exam has Amazon Bedrock somewhere in the answer. It is the service that turns "we want to use a foundation model" into an API call: pick a model from a catalogue of providers, send a prompt, get a completion, and pay for the tokens. Around that call AWS has built the pieces a real application needs, and each piece has a name the exam expects you to know: Knowledge Bases for your documents, Agents for tasks that take several steps, Guardrails for what must never be said, customisation jobs for teaching a model your data, evaluation jobs for choosing between models, and the logging, pricing and network controls that let a regulated company sign off on all of it. This article is the reference for the whole service. The previous article placed Bedrock in the AWS stack, and the next one explains the theory of RAG, vector search and agent loops; here the subject is Bedrock itself, feature by feature.
The map
Read this first when short on time. Every branch is a section below.
One API: what Amazon Bedrock is and the promise it makes about your data
Amazon Bedrock is a fully managed, serverless service that puts foundation models from Amazon and several other providers behind a single API, so an application can call any of them with one set of credentials, one SDK and one bill, without provisioning or running any model infrastructure.
"Fully managed" and "serverless" carry specific meaning here. There is no instance to choose, no container to patch and no endpoint sitting idle at night: AWS runs the models on shared capacity in its own accounts, and you are billed for what you use, by the token for text models, by the image for image models, or by the hour for reserved capacity. "Single API" means that the same InvokeModel or Converse call reaches an Amazon Nova model, an Anthropic Claude model or a Meta Llama model, and switching between them is a change to a model identifier, not a rewrite. That is what makes the model choice reversible: you can evaluate three models against your own prompts and change your mind after launch.
The catalogue at the time of writing has models from Amazon (the Titan and Nova families), Anthropic, Meta, Mistral AI, Cohere, AI21 Labs and Stability AI, with a longer tail of specialised and open-weights models offered through Amazon Bedrock Marketplace. The next section lists them. Around the models, Bedrock adds managed building blocks that would otherwise be weeks of work each: Knowledge Bases for retrieval over your documents, Agents for multi-step tasks that call your APIs, Guardrails for filtering input and output, model customisation for fine-tuning or continued pre-training, model evaluation for comparing candidates, Prompt Management and Flows for versioned prompts and visual pipelines, and invocation logging for the audit trail.
flowchart TD APP["Your application<br/>AWS SDK call with IAM credentials"] GI["Guardrail, input side<br/>denied topics, PII, prompt attacks"] CV["Converse or InvokeModel<br/>one prompt, one answer"] RG["RetrieveAndGenerate<br/>a Knowledge Base"] IA["InvokeAgent<br/>an Agent"] FM["Foundation model<br/>Nova, Claude, Llama, Mistral, Cohere"] VS["Vector store<br/>OpenSearch Serverless by default"] LF["AWS Lambda<br/>action group"] GO["Guardrail, output side<br/>grounding check, PII redaction"] APP --> GI GI --> CV GI --> RG GI --> IA CV --> FM RG --> VS RG --> FM IA --> LF IA --> RG IA --> FM FM --> GO GO --> APP
The data promise
The sentence AWS repeats in every Bedrock page is the one the exam tests most: your prompts and completions are not used to train or improve the base models, and they are never shared with the model providers. The provider does not see your traffic; the model runs inside AWS. Data is encrypted in transit with TLS and at rest with AWS-managed keys, or with your own AWS KMS keys where Bedrock stores something on your behalf (custom models, Knowledge Base configuration, agents, logs). Inputs and outputs are processed in the region you called and are not stored by the service unless you turn on model invocation logging yourself. Custom models that you create by fine-tuning are private copies that only your account can invoke. AWS does run automated abuse detection on traffic, which looks for patterns that break the acceptable use policy, but that is a classifier over content, not a training pipeline.
The stack article compared Bedrock with SageMaker JumpStart, where you host a model yourself. The one-line version: JumpStart gives you an endpoint you run on instances you pay for by the hour; Bedrock gives you an API you pay for by use, and everything below it is AWS's problem.
- Amazon Q, the Business and Developer assistants and the Q features inside QuickSight and Connect, runs on Bedrock; AWS uses its own platform for its own products.
- Lonely Planet built its travel itinerary generator on Anthropic Claude through Bedrock and has said publicly that it cut its generation cost sharply against its previous provider, the kind of model switch the single API is meant to make cheap.
- Intuit and Nasdaq are among the financial companies AWS names as Bedrock customers; for them the data promise and the compliance scope are the point, not the model list.
- Bedrock is a service, not a model. An answer that says "use Amazon Bedrock to generate text" is incomplete without a model; an answer that says "use Amazon Titan" is incomplete without Bedrock as the way to reach it. The exam usually wants the service.
- Not every model is in every region. A model can be in the catalogue and still unavailable where your application runs; cross-region inference, covered under pricing, is the usual fix.
- "Not used for training" is about the base model. If you fine-tune a model on your data, your data obviously shapes that custom model; the promise is that it never reaches the provider's shared model.
"Serverless", "fully managed", "a single API", "choice of foundation models from multiple providers", "without managing infrastructure" and "data is not used to train the models" are the fingerprints of Amazon Bedrock. A scenario that wants a foundation model with the least operational overhead is Bedrock; one that wants full control of the instance and the training recipe is SageMaker.
- foundation model (FM)
- A large model trained on broad data that can be adapted to many tasks by prompting or customisation; Bedrock's catalogue is a list of these.
- serverless
- The service scales and runs the infrastructure; you never see or pay for an instance, only for use.
- model provider
- The company that trained the model: Amazon, Anthropic, Meta, Mistral AI, Cohere, AI21 Labs, Stability AI and others. Bedrock hosts their models without them seeing your data.
The model catalogue: providers, families and what each modality does
The Bedrock catalogue is organised by provider, then by model family, and the first thing to know about any family is its modality: what goes in, what comes out, and whether it is meant for generation, embeddings or images.
The exam does not ask for version numbers, which change every few months, but it does expect you to know which family does what and which provider it belongs to. The table lists the families that appear in the exam guide and the ones the console shows first.
| Provider | Family | Modality | What it is for |
|---|---|---|---|
| Amazon | Titan: Titan Text (Lite, Express, Premier), Titan Text Embeddings V2, Titan Multimodal Embeddings, Titan Image Generator | Text to text; text to embedding; text and image to embedding; text to image | The original Amazon family. Titan Text Embeddings V2 is the default embedding model for Knowledge Bases; Titan Image Generator makes, edits, inpaints and outpaints images with an invisible watermark. |
| Nova: Nova Micro, Nova Lite, Nova Pro, Nova Premier; Nova Canvas; Nova Reel; Nova Sonic | Micro is text only; Lite, Pro and Premier take text, images and video and return text; Canvas makes images; Reel makes short videos; Sonic is speech to speech | The newer Amazon family, priced low and tuned for speed. Micro for cheap classification and routing, Lite and Pro for everyday multimodal work, Premier for hard reasoning and as a teacher for distillation. | |
| Anthropic | Claude: Haiku, Sonnet and Opus tiers across versions | Text and images in, text out | Strong reasoning, long context, careful instruction following and tool use; the usual choice for agents and complex document work. Haiku is the small fast tier, Opus the largest. |
| Meta | Llama: Llama 2, 3, 3.1, 3.2, 3.3 and 4 in several sizes, some with vision | Text in, text out; vision variants take images | Open-weights models with a permissive licence, available in small sizes and fine-tunable in Bedrock; a common choice when the same model must also run elsewhere. |
| Mistral AI | Mistral and Mixtral: Mistral 7B, Mixtral 8x7B, Mistral Small, Mistral Large, Pixtral Large | Text in, text out; Pixtral takes images | Efficient European models, several open-weights; Mixtral is a mixture-of-experts model, Large the flagship. |
| Cohere | Command (Command R, Command R+, older Command and Command Light); Embed (English, Multilingual); Rerank | Text to text; text to embedding; query plus documents to a ranked list | Command R models are built for RAG and tool use with citations; Embed is the alternative embedding model in Knowledge Bases; Rerank reorders retrieved chunks. |
| AI21 Labs | Jamba (Jamba 1.5 Large and Mini, Jamba-Instruct); older Jurassic-2 | Text in, text out | Jamba is a hybrid of a transformer and a state-space model with a very long context window, aimed at long documents at modest cost. |
| Stability AI | Stable Diffusion XL and 3.x, Stable Image Core and Ultra | Text to image, image to image | Image generation and editing; the provider to name when a question is about pictures rather than words and Titan or Nova Canvas is not offered. |
Beyond that table the catalogue keeps growing: DeepSeek reasoning models, Luma AI and TwelveLabs for video, Writer for enterprise text, and open-weights models from OpenAI and Qwen have appeared as fully managed serverless models, and Amazon Bedrock Marketplace adds more than a hundred specialised models that deploy onto managed endpoints rather than shared serverless capacity. The exam guide names only the families in the table.
Model access
A model must be enabled in your account and region before it can be called. In the console the Model access page lists every model with its status; historically every model had to be requested, and Anthropic models asked for a short use-case form, filled in once per account. Newer accounts have most serverless models enabled on first use, but the IAM side never went away: a principal needs bedrock:InvokeModel on the model's ARN, so access is really two gates, the account-level switch and the IAM policy. When a question describes a developer who "cannot see the model in the console" or gets an access denied error on a new model, one of those two gates is the answer.
The playgrounds
The console has a chat and text playground, an image playground and a video playground. Each lets you pick a model, type a prompt, drag the inference parameters (temperature, top-p, response length, stop sequences) and see the output, with a compare mode that puts up to three models side by side on the same prompt, and a "view API request" button that shows the exact JSON so the experiment can be pasted into code. The playgrounds are where a model is evaluated by hand before an evaluation job or an application is written; they use the same on-demand pricing as the API.
- Amazon Bedrock Knowledge Bases defaults to Titan Text Embeddings V2 for the embeddings and offers Cohere Embed as the alternative, which is why those two names are the embedding models to remember.
- Anthropic Claude is the model AWS reference architectures reach for when an agent must plan several steps, and Nova Micro or Claude Haiku when the job is a cheap classification of every incoming message.
- Retail marketing teams use Stability AI and Titan Image Generator on Bedrock for product imagery variations, where the invisible watermark matters for provenance.
- Embedding models do not generate text. Titan Text Embeddings V2 and Cohere Embed return vectors; an answer that uses them to write a summary is wrong.
- Nova Micro is text only. A scenario with images or video needs Nova Lite or Pro, or Claude.
- Titan and Nova are Amazon's own; everything else is a partner's. A question about "an AWS first-party model" is one of those two.
Match the modality to the family: "generate images" is Titan Image Generator, Nova Canvas or Stability AI; "embeddings for search" is Titan Text Embeddings or Cohere Embed; "video" is Nova Reel; "speech in, speech out" is Nova Sonic; "complex reasoning or an agent" is Claude; "open-weights model that also runs on premises" is Llama or Mistral. "Amazon's own model" is Titan or Nova. A model "not available in the console" is a model access question, not a quota question.
- modality
- The kind of data a model consumes and produces: text, image, video, audio, or an embedding vector.
- open weights
- A model whose trained parameters are published under a licence, so it can run on Bedrock or on your own hardware; Llama and Mistral are examples, Claude and Nova are not.
- mixture of experts
- An architecture where only some of the model's sub-networks activate for each token, giving a large model's quality at a smaller model's cost per token; Mixtral is the well-known example.
- Amazon Bedrock Marketplace
- A catalogue of additional models from many providers that deploy onto managed endpoints you pay for by the hour, reached through the same Bedrock APIs.
Calling a model: the endpoints, InvokeModel, Converse and the inference parameters
Bedrock is four API endpoints, and inference itself is two request shapes: InvokeModel, which sends the provider's own JSON, and Converse, which sends one uniform message format to every model, each with a streaming twin.
The SDKs split Bedrock into four clients, and knowing which does what saves confusion when reading an IAM policy or an error message. bedrock is the control plane: list the foundation models, start a customisation or evaluation job, configure logging, buy provisioned throughput. bedrock-runtime is inference: InvokeModel, Converse, their streaming variants and ApplyGuardrail. bedrock-agent builds Knowledge Bases, Agents, Flows, Prompts and Guardrail configuration, and bedrock-agent-runtime runs them: Retrieve, RetrieveAndGenerate, InvokeAgent, InvokeFlow and Rerank.
flowchart TD APP["Your application or the console"] B["bedrock<br/>control plane: list models, customisation and evaluation jobs,<br/>logging settings, provisioned throughput"] BA["bedrock-agent<br/>build time: create Knowledge Bases, Agents,<br/>Flows, Prompts, Guardrails"] BR["bedrock-runtime<br/>InvokeModel, Converse, the streaming variants,<br/>ApplyGuardrail"] BAR["bedrock-agent-runtime<br/>Retrieve, RetrieveAndGenerate, InvokeAgent,<br/>InvokeFlow, Rerank"] APP --> B APP --> BA B --> BR BA --> BAR
InvokeModel
InvokeModel takes a modelId and a body, and the body is whatever JSON that provider's model expects: Titan Text wants inputText and a textGenerationConfig block, Anthropic wants a messages array with max_tokens, Llama wants a prompt string with max_gen_len. The response body is equally provider-specific. It works for every model, including image and embedding models, which have no chat shape to unify, but switching text models means rewriting the request and the response parsing. InvokeModelWithResponseStream is the same request with the answer delivered as a stream of chunk events as the tokens are produced, which is what a chat interface needs to show text appearing rather than a spinner.
Converse
Converse was added to remove that per-provider rewrite for conversational models. Every request has the same shape: an optional system prompt, a messages array of user and assistant turns whose content blocks can be text, images or documents, an inferenceConfig with the common parameters, and optional toolConfig for tool use and guardrailConfig to attach a guardrail. Anything provider-specific goes in additionalModelRequestFields (top-k is the usual case). Every response has the same shape too: the assistant's message, a stopReason (end_turn, max_tokens, stop_sequence, tool_use, guardrail_intervened or content_filtered) and a usage block with input and output token counts, which is what a cost dashboard reads. ConverseStream streams the same thing. Because the format is uniform, changing the model is changing one string.
import boto3
rt = boto3.client("bedrock-runtime", region_name="eu-west-1")
resp = rt.converse(
modelId="amazon.nova-lite-v1:0", # swap for anthropic.claude-... and nothing else changes
system=[{"text": "You answer in one short paragraph."}],
messages=[{"role": "user", "content": [{"text": "What does a Bedrock Knowledge Base do?"}]}],
inferenceConfig={"maxTokens": 300, "temperature": 0.2, "topP": 0.9, "stopSequences": ["###"]},
)
print(resp["output"]["message"]["content"][0]["text"])
print(resp["stopReason"], resp["usage"]) # end_turn {'inputTokens': 31, 'outputTokens': 84, ...}The modelId does not have to be a base model. It can be the ARN of a custom model you fine-tuned, of the provisioned throughput that hosts it, of an imported model, of a prompt from Prompt Management, or a cross-region inference profile such as eu.amazon.nova-lite-v1:0, which lets Bedrock route the request to any region in the geography with spare capacity. The same call handles all of them.
The inference parameters
The applications article explains what each sampling parameter does to the probability curve; here is where they live in Bedrock and what to reach for in a scenario.
| Parameter | Converse field | What it does | Turn it down when | Turn it up when |
|---|---|---|---|---|
| Temperature | inferenceConfig.temperature | Scales how flat the next-token distribution is before sampling. 0 always takes the most likely token; 1 samples from the model's own distribution. | The output must be consistent and factual: extraction, classification, code, answers from retrieved text. | Variety is wanted: brainstorming, marketing copy, several draft options. |
| Top-p (nucleus) | inferenceConfig.topP | Keeps only the smallest set of tokens whose probabilities add up to p, then samples inside it. | Odd or off-topic words are slipping in; a low p cuts the tail. | Answers feel repetitive or formulaic. |
| Top-k | additionalModelRequestFields (for example top_k), not every model supports it | Keeps only the k most likely tokens regardless of their probability. | Same purpose as top-p with a fixed count; k of 1 is greedy decoding. | Rarely raised on purpose; large k filters nothing. |
| Maximum tokens (response length) | inferenceConfig.maxTokens | Hard ceiling on output tokens; generation stops mid-sentence when reached and stopReason says max_tokens. | Cost control, or answers must be short. | Answers are being cut off. |
| Stop sequences | inferenceConfig.stopSequences | Strings that end generation the moment the model emits them. | Use one to stop after a single turn, a single list item or a closing tag so the model does not write the next speaker's lines. Not a dial, a list. | |
Two rules of thumb. Change temperature or top-p, not both, or the effects become hard to reason about. And remember that these parameters change the output, not the model: a question that proposes retraining to make answers "more consistent" or "less random" is describing a temperature setting.
- boto3 and the other AWS SDKs expose all of this directly; most production code on Bedrock is a
conversecall wrapped in retry logic and a token counter. - LangChain and LlamaIndex ship Bedrock integrations (
ChatBedrockConverseand friends) that sit on the Converse API precisely because one adapter then covers every model. - Streaming chat front ends, including the Bedrock playground itself, use
ConverseStreamso the first words appear in under a second even when the full answer takes ten.
- Converse is for conversational models. Embedding and image models still go through
InvokeModelwith their own body shape. - Streaming is a different API, not a flag.
InvokeModelWithResponseStreamandConverseStreamneed their own IAM action and a client that reads an event stream. - The context window is a model property. Input tokens plus
maxTokensmust fit inside it; a request over the limit is rejected, not truncated.
"Switch between models without changing code" is the Converse API. "Show the response as it is generated" is InvokeModelWithResponseStream or ConverseStream. "Consistent, repeatable, factual" is a low temperature; "creative, varied" is a high one; "the response is cut off" is maximum tokens; "the model keeps writing past the answer" is a missing stop sequence. None of these needs a new model, and any option that fine-tunes to fix randomness is a distractor.
- InvokeModel
- The original inference API: a model identifier plus the provider's native JSON body; works for text, image and embedding models.
- Converse
- The uniform chat API: system, messages, inferenceConfig, toolConfig and guardrailConfig in one shape for every conversational model.
- stopReason
- Why generation ended: the model finished, hit the token cap, hit a stop sequence, asked to use a tool, or a guardrail intervened.
- inference profile
- A model identifier that stands for a model in one or more regions; cross-region profiles let Bedrock route a request across a geography.
Knowledge Bases: managed retrieval over your own documents
Amazon Bedrock Knowledge Bases (launched as Knowledge Bases for Amazon Bedrock) is the managed implementation of Retrieval Augmented Generation: you point it at your documents, choose an embedding model and a vector store, and it ingests, chunks, embeds and indexes them, then answers questions from them with citations through two APIs.
The applications article explains why RAG works and where it fails; this section is about the Bedrock product. The reason it exists is the exam's favourite scenario: a company wants a model to answer from its own current documents, does not want to train anything, and must show where each answer came from. A Knowledge Base does that in a console wizard.
Building one
- Choose a data source. Amazon S3 is the usual one: a bucket or prefix of PDFs, Word files, HTML, Markdown, CSV and text, optionally with a sidecar metadata JSON per file for filtering. Other connectors are a web crawler for public pages, Confluence, Microsoft SharePoint and Salesforce, and a custom data source that lets your own code push documents through the API. A Knowledge Base can also sit on structured data (Amazon Redshift, tables in the AWS Glue Data Catalog), where it turns a question into SQL instead of a vector search, or use an Amazon Kendra GenAI index as its retriever.
- Choose how documents are parsed and chunked. The default parser extracts text; a foundation-model parser or Amazon Bedrock Data Automation can be used instead to read tables, figures and scanned pages. Chunking decides how big each retrievable piece is; the table below lists the strategies.
- Choose the embedding model. Amazon Titan Text Embeddings V2 (with a choice of vector dimensions) or Cohere Embed, English or Multilingual. The same model embeds the question later, so it cannot be changed without re-indexing.
- Choose the vector store. "Quick create" makes an Amazon OpenSearch Serverless vector collection for you; otherwise you connect a store you already run. The table below lists them.
- Sync. An ingestion job reads the source, chunks, embeds and writes to the store. It is incremental: re-running it picks up new, changed and deleted documents. Nothing is retrievable until the first sync finishes.
| Chunking strategy | How it splits | Choose it when |
|---|---|---|
| Default | Fixed chunks of roughly 300 tokens with a small overlap. | You have no reason to think about it yet. |
| Fixed size | You set the maximum tokens per chunk and the overlap percentage. | Documents are uniform (tickets, FAQs) and you want to tune size against retrieval quality. |
| Hierarchical | Small child chunks nested under larger parent chunks; search matches children, the parent is returned for context. | Precise matching matters but the model needs the surrounding section to answer well (manuals, contracts). |
| Semantic | Breaks where the meaning shifts, measured by embedding similarity between neighbouring sentences. | Documents mix topics within a page and fixed boundaries keep cutting ideas in half. |
| No chunking | One document, one chunk; you pre-split the files yourself. | You already chunked upstream, or each file is a short self-contained record. |
| Custom (Lambda) | A Lambda function you write transforms the chunks during ingestion. | You need chunk-level metadata, redaction or a domain-specific split. |
| Vector store | What it is | Pick it when |
|---|---|---|
| Amazon OpenSearch Serverless | A serverless vector collection; the quick-create default; supports hybrid (keyword plus vector) search. | Nothing else is dictated; the exam's default answer. |
| Amazon OpenSearch Service (managed cluster) | A provisioned OpenSearch domain you already run. | The team already operates OpenSearch and wants one store. |
| Amazon Aurora PostgreSQL with pgvector | Vectors in a relational table next to your business data. | "PostgreSQL", "pgvector", "join vectors with relational data", "reuse the existing database". |
| Amazon Neptune Analytics | A graph database; the Knowledge Base builds a graph of entities and relationships as it ingests, so retrieval can follow links between chunks. | "GraphRAG", "relationships between documents", "connected entities". |
| Pinecone | A partner's managed vector database. | The company already uses Pinecone. |
| Redis Enterprise Cloud | A partner's in-memory database with vector search. | Very low retrieval latency and an existing Redis estate. |
| MongoDB Atlas | A partner's document database with vector search. | The documents already live in MongoDB. |
| Amazon S3 Vectors | The newest option: vectors stored natively in S3 buckets at low cost, for large indexes queried less often. | Cost matters more than millisecond latency. |
Two ways to query
Retrieve does the search only: it embeds the question, queries the store and returns the top chunks with their text, relevance score, source location (an S3 URI, a URL) and metadata. Your code decides what to do with them, which is right when you want your own prompt, your own model or no generation at all. RetrieveAndGenerate does the whole thing: it retrieves, builds a prompt from the chunks and the question, calls the foundation model you choose, and returns the answer with citations that tie each span of the answer to the chunks and documents it came from. A sessionId keeps a conversation going across calls so follow-up questions can lean on earlier turns, and RetrieveAndGenerateStream streams the answer. Query-time options cover the number of results, semantic versus hybrid search, metadata filters (only documents where department equals finance), a re-ranking model over the candidates, query decomposition for multi-part questions, and a custom generation prompt template.
sequenceDiagram autonumber participant A as Application participant K as Knowledge Base participant V as Vector store participant M as Foundation model A->>K: RetrieveAndGenerate, the question K->>K: embed the question K->>V: nearest chunks, top k, filters V-->>K: chunks, scores, source URIs K->>K: prompt from chunks and question K->>M: generate an answer M-->>K: answer grounded in the chunks K-->>A: answer plus citations, sessionId
RetrieveAndGenerate call. Steps 2 to 4 are all that Retrieve does; the managed service adds the prompt assembly, the model call and the citation mapping. The embedding model at step 2 is the one chosen when the Knowledge Base was built.A Knowledge Base is also a component: an Agent can have one or more attached as tools, a Flow can have a Knowledge Base node, and a Guardrail's contextual grounding check can use the retrieved chunks as the source of truth to test the answer against. That last combination, retrieval plus a grounding check, is the exam's complete answer to "reduce hallucinations about company information".
- Customer support assistants over product manuals and policy documents are the canonical Knowledge Base: S3 bucket in, cited answers out, a sync job on a schedule after each documentation release.
- Amazon Q Business is the same idea packaged as a product, with dozens of connectors and user-level permissions; a Knowledge Base is the building block you use when you are writing the application yourself.
- Internal engineering assistants at companies running Confluence and SharePoint use the connectors so runbooks and design documents are searchable without an export step.
- The embedding model is fixed at creation. Changing it means a new Knowledge Base and a full re-index; changing the generation model in
RetrieveAndGenerateis free. - A Knowledge Base does not enforce per-user permissions. Everyone who can call it can retrieve from everything in it; metadata filters and separate Knowledge Bases are how access is partitioned. Amazon Q Business is the product that inherits source permissions.
- Stale index, stale answers. Documents changed in S3 are not in the index until the next sync; schedule it or trigger it from an S3 event.
"Answer questions from company documents", "up-to-date information without retraining", "cite the source", "proprietary data the model was not trained on" and "lowest effort RAG" all point at Amazon Bedrock Knowledge Bases. "GraphRAG" is Neptune Analytics; "pgvector" is Aurora PostgreSQL; the default store is OpenSearch Serverless. "Retrieve only, our own prompt" is the Retrieve API; "answer with citations" is RetrieveAndGenerate. A distractor that fine-tunes a model to teach it company facts loses to a Knowledge Base every time.
- data source
- Where a Knowledge Base reads documents: S3, a web crawler, Confluence, SharePoint, Salesforce or a custom feed through the API.
- ingestion job (sync)
- The run that parses, chunks, embeds and indexes new and changed documents from a data source.
- citation
- In a
RetrieveAndGenerateresponse, the mapping from a span of the answer to the retrieved chunks and their source locations. - GraphRAG
- Retrieval that also follows relationships between entities in a graph, so related chunks are found even when they share no words; Neptune Analytics is Bedrock's graph store for it.
Agents: a model that plans, calls your APIs and remembers the session
Amazon Bedrock Agents (launched as Agents for Amazon Bedrock) is the managed way to build an assistant that completes a task in several steps: you give it instructions, a foundation model and a set of tools, and Bedrock runs the loop in which the model decides what to do next, calls a tool, reads the result and continues until it can answer.
The applications article explains the agent loop as a pattern; the pieces of the Bedrock product are what the exam asks about, and each has a fixed name.
- Instructions. Plain English describing the agent's job and rules ("You help customers track and change orders. Never cancel an order without confirming the order number."). Bedrock combines them with the tool definitions into the orchestration prompt.
- Foundation model. The model that reasons; a Claude or Nova model is typical. Its quality decides how well the agent plans.
- Action groups. The tools. Each action group is a set of operations defined either by an OpenAPI schema (paths, parameters and descriptions, in JSON or YAML, inline or in S3) or by function details (name, description and parameters typed straight into the console). The descriptions are read by the model to decide which operation fits, so they are prompt engineering, not documentation. Each group is executed by an AWS Lambda function that receives the chosen operation and its parameters and does the real work, or is set to return of control, in which case Bedrock hands the chosen operation back to your application in the response and your code executes it and sends the result in the next call. Operations can require user confirmation before they run. A built-in code interpreter action group lets the agent write and run Python in a sandbox for calculations and file handling.
- Knowledge Bases. Attaching one gives the agent a retrieval tool; the agent decides when to search and cites what it used.
- Guardrails. A guardrail attached to the agent filters the user's input and the agent's final output.
- Memory. Session memory is the conversation within one
sessionId: every turn, tool call and result is kept until the session ends or times out. Optional long-term memory keeps a summary of past sessions for the same user (amemoryId) for a configurable number of days, so the agent remembers preferences across conversations. - Prompt templates and trace. The four prompts the agent uses internally (pre-processing, orchestration, Knowledge Base response generation, post-processing) can be edited, and
enableTracereturns every reasoning step, tool call and observation, which is how an agent is debugged. - Versions and aliases. An agent is edited as a draft, prepared, and invoked through an alias that points at a version, so production keeps running the tested version while you change the draft.
The reasoning loop
An InvokeAgent call carries the user's text and a sessionId. The agent optionally pre-processes the input (is this request valid and in scope?), then enters orchestration: the model is shown the instructions, the tools, the conversation so far and the new request, and it produces either a tool call or a final answer. A tool call is executed (Lambda, return of control or a Knowledge Base search), the result is appended as an observation, and the model is asked again. When it produces a final answer, optional post-processing can rewrite it, the Guardrail checks it, and the response streams back with the trace if requested. This is the ReAct pattern, reason then act then observe, run by Bedrock.
sequenceDiagram autonumber participant A as Application participant G as Bedrock Agent participant M as Foundation model participant L as Lambda action A->>G: InvokeAgent(sessionId, text) G->>M: orchestration prompt plus tools M-->>G: call getOrder(orderId 4471) G->>L: event with operation and params L-->>G: order status as JSON G->>M: observation appended, continue M-->>G: final answer text G-->>A: completion stream plus trace
Beyond one agent
Multi-agent collaboration lets a supervisor agent delegate to specialist collaborator agents, each with its own instructions and tools, when one agent's instruction set would grow too long to follow reliably. Inline agents are defined at invocation time in the request rather than created in advance, useful when tools differ per user. And for teams that bring their own agent framework rather than Bedrock's loop, Amazon Bedrock AgentCore offers the runtime, memory, gateway and identity services to host it; for the exam, Bedrock Agents is the managed loop and that is enough.
- Order and booking assistants are the reference use case: a Knowledge Base holds the policies, one action group looks up the customer's record, another changes the booking, and the Lambda functions call the existing APIs.
- Insurance claims intake agents gather the facts over several turns, check coverage in a Knowledge Base, open the claim through an action group and require user confirmation before submitting.
- Amazon Q Business plugins are the same shape (actions in Jira or ServiceNow) shipped as a finished product; Bedrock Agents is what you use when the assistant is your own application.
- An agent is only as good as its tool descriptions. Vague OpenAPI descriptions make the model pick the wrong operation; that is the first thing to fix when the trace shows odd choices.
- Lambda needs permission both ways. The agent's service role must be allowed to invoke the function, and the function's resource policy must allow Bedrock to call it; a missing half is the classic "agent cannot call the action" error.
- Prepare and alias before invoking. Changes to a draft agent are not live until it is prepared, and production calls should go through an alias, not the test alias.
"Multi-step task", "call APIs", "take actions on behalf of the user", "orchestrate", "book, update, look up and then respond" all point at Amazon Bedrock Agents. Action groups are defined by an OpenAPI schema or function details and executed by Lambda; return of control means your application executes the action instead. Knowledge Bases give the agent facts, Guardrails police it, session memory keeps the conversation. A finished enterprise assistant "without building an application" is Amazon Q Business, not an Agent.
- action group
- A named set of operations an agent may call, described by an OpenAPI schema or function details, executed by a Lambda function or returned to the application.
- return of control
- An action group setting under which Bedrock returns the chosen operation and parameters to the caller instead of invoking Lambda.
- orchestration
- The loop in which the model reads the state, chooses a tool or an answer, and continues after each observation.
- alias
- A named pointer to a prepared version of an agent (or a Flow or Prompt), so callers are insulated from edits to the draft.
Guardrails: the policies that filter what goes in and what comes out
Amazon Bedrock Guardrails (launched as Guardrails for Amazon Bedrock) is a set of configurable safety policies that is applied to the prompt before it reaches the model and to the response before it reaches the user, independent of which model is used, so an organisation defines its rules once and applies them everywhere.
A guardrail is a resource you create, version and attach. It can be attached to a model call (the guardrailConfig block in Converse or the guardrail fields of InvokeModel), to an Agent, to a Knowledge Base's RetrieveAndGenerate, and to a Flow. It can also be called on its own through the ApplyGuardrail API with any text you like, which is how the same policies are applied to a model hosted on SageMaker, a third-party API or a legacy chatbot. Each guardrail is built from up to six policy types.
| Policy type | What it catches | How you configure it | Applied to |
|---|---|---|---|
| Content filters | Harmful content in categories: hate, insults, sexual, violence, misconduct, and prompt attacks (jailbreaks and prompt injection). Image content can be filtered too. | A strength per category, none, low, medium or high, set separately for prompts and for responses. Prompt attack detection applies to input only. | Input and output |
| Denied topics | Subjects the application must not engage with, even politely: investment advice in a banking bot, medical diagnosis in a wellness app, a competitor's products. | A name, a natural-language definition of the topic and a few sample phrases; the classifier generalises from them. | Input and output |
| Word filters | Exact words and phrases: profanity, competitor names, internal code names. | Your own list plus a managed profanity list. | Input and output |
| Sensitive information filters | Personally identifiable information: names, email addresses, phone numbers, addresses, national identifiers, card numbers and so on, plus anything matching your own regular expressions. | Per type, block (reject the whole message) or mask (replace with a tag such as {NAME}, which is redaction). | Input and output; masking is most used on output |
| Contextual grounding check | Hallucination: an answer that is not supported by the source material, or that does not address the question. | Two thresholds between 0 and 1: a grounding score (is the answer supported by the source) and a relevance score (does it answer the query). The source is the retrieved text, passed automatically by a Knowledge Base or by you. | Output only |
| Automated reasoning checks | Answers that break rules you can state precisely (eligibility, policy conditions), verified with formal logic against a policy you built from your documents. | An automated reasoning policy generated from a document and refined with tests. | Output only |
flowchart TD U["User prompt"] I["Input policies<br/>content filters and prompt attack, denied topics,<br/>word filters, sensitive information"] FM["Foundation model, Agent or Knowledge Base<br/>produces a response"] O["Output policies<br/>content filters, denied topics, word filters,<br/>sensitive information masked or blocked"] G["Contextual grounding check<br/>is the answer supported by the source and relevant"] R["Response to the user<br/>or the configured blocked message"] U --> I I --> FM FM --> O O --> G G --> R
When a policy fires, the caller sees a stopReason of guardrail_intervened and the response text is replaced by the blocked message you configured ("Sorry, I can only help with questions about your account."). The assessment in the response says which policy matched, which is what a compliance report reads. Guardrails are versioned like code: you edit a working draft, create a numbered version and point production at it. Selective evaluation lets you tag only part of a prompt (the user's text, not your system instructions) so the filters do not fire on your own template. Streaming responses are checked in chunks as they arrive, or, if you prefer certainty over latency, after the whole response is complete.
- Banks use denied topics to stop a service assistant from giving investment or tax advice, which would be a regulated activity, and the audit trail of blocked requests is part of their evidence.
- Contact centres mask PII in transcripts and summaries with the sensitive information filter so agents and analytics never see card numbers.
- Teams hosting open models on SageMaker call
ApplyGuardrailaround their own endpoint so the same policy applies to every model the company runs.
- Grounding needs a source. The contextual grounding check compares the answer with retrieved text; on a plain model call with no source it has nothing to check against, so it belongs with a Knowledge Base or with RAG you built.
- Guardrails add latency and cost. Each policy type is priced per text unit and adds a step; do not turn on every filter at high strength for an internal tool that does not need it.
- A guardrail is not a permission. It filters content; it does not stop a user from calling a model. IAM does that.
"Block harmful content", "prevent the assistant discussing a topic", "redact or mask PII", "detect prompt injection or jailbreaks", "consistent safety policy across all models" are Amazon Bedrock Guardrails, and each maps to one policy type: content filters, denied topics, sensitive information filters, prompt attack filter. "Reduce hallucinations" or "responses not supported by the source" is the contextual grounding check, often together with a Knowledge Base. "Apply the same policy to a model outside Bedrock" is the ApplyGuardrail API.
- denied topic
- A subject defined in plain language that the guardrail refuses to discuss, on input or output.
- prompt attack
- An input that tries to override the system prompt or trick the model out of its rules (jailbreak, prompt injection); one of the content filter categories.
- masking
- Replacing detected sensitive information with a type tag, leaving the rest of the text intact; the alternative to blocking the whole message.
- ApplyGuardrail
- The API that runs a guardrail over arbitrary text without a model call, so the policies work outside Bedrock's own inference.
Customisation: fine-tuning and continued pre-training, and the private model they produce
Model customisation in Bedrock is a managed training job that takes a supported base model and your data in S3 and produces a private custom model in your account, either by fine-tuning on labelled examples of the task you want or by continued pre-training on unlabelled text from your domain.
Customisation is the expensive rung of the ladder that the applications article describes and the training article explains in depth; here is how the Bedrock product works and, more important for the exam, when to reach for it and when not to.
Fine-tuning
Fine-tuning teaches a model a task or a style: answer in our support tone, classify tickets into our twelve categories, extract fields into our JSON schema. The training data is labelled: a JSONL file in S3 where each line is an example of an input and the output you want. For older text models each line is a prompt and a completion; for conversational models it is a system prompt plus a messages array in the Converse shape. A validation file lets the job report how well the model generalises. You choose the base model (Amazon Titan Text, Amazon Nova, Meta Llama, Cohere Command and Anthropic Claude Haiku are among those that support fine-tuning) and a few hyperparameters, chiefly the number of epochs, the batch size, the learning rate and warm-up steps; the job writes training and validation loss to S3 as it goes.
{"prompt": "Classify the ticket: My invoice shows two charges for March.", "completion": "billing_duplicate_charge"}
{"prompt": "Classify the ticket: The app crashes when I open settings.", "completion": "app_crash"}
{"prompt": "Classify the ticket: How do I add a second user to my plan?", "completion": "account_management"}Continued pre-training
Continued pre-training teaches a model vocabulary rather than a task: it keeps training the base model on raw, unlabelled text from your domain (regulatory filings, clinical notes, your own product documentation) so it becomes fluent in that language before you prompt or fine-tune it. The data is a JSONL file where each line carries just an input field of text. It needs far more data than fine-tuning and is supported on a smaller set of models, the Amazon Titan Text family in particular. It does not make the model know today's facts, and it does not give citations; that is what a Knowledge Base is for.
What you get, and what it costs to run
Both jobs produce a custom model: a private copy visible only in your account, encrypted with an AWS key or your own KMS key, listed under custom models in the console. The base model is unchanged for everyone else. The rule the exam repeats is that a custom model cannot be invoked on demand; it must be hosted on provisioned throughput, bought in model units by the hour, either with no commitment or with a one- or six-month commitment at a lower hourly rate. So the bill for customisation has three parts: the training job, charged by tokens processed times epochs; storage of the custom model per month; and provisioned throughput for as long as it is invocable. That third line is why a fine-tuned model that serves a few requests a day is usually the wrong design.
flowchart TD D["Training data in Amazon S3<br/>a JSONL file: labelled pairs,<br/>or raw domain text"] J["Model customisation job<br/>base model, epochs, batch size<br/>learning rate, VPC and KMS options"] V["Metrics to S3<br/>training and validation loss"] M["Custom model<br/>private, encrypted, in your account"] P["Provisioned throughput<br/>model units, hourly or committed"] I["Invoke with the same API<br/>modelId is the provisioned model ARN"] D --> J J --> V J --> M M --> P P --> I
Two neighbours of customisation are worth a sentence. Custom Model Import brings weights you trained elsewhere (Llama, Mistral and a few other architectures, from S3 or a SageMaker training job) into Bedrock, where they run on demand and are billed in custom model units while active. Model Distillation uses a large teacher model to generate training responses for a small student model of the same family (Nova Premier teaching Nova Pro, a large Claude teaching a smaller one), from your prompts or from your invocation logs, so you get much of the large model's quality at the small model's price and latency.
Which rung of the ladder
| Prompt engineering | Knowledge Base (RAG) | Fine-tuning | Continued pre-training | |
|---|---|---|---|---|
| What it changes | The instructions and examples sent with each request | The facts available at question time | The model's behaviour: task, format, tone | The model's language: domain vocabulary and style |
| Data needed | None beyond a few examples in the prompt | Your documents, any format, in S3 or a connector | Hundreds to thousands of labelled input and output pairs, JSONL | A large corpus of unlabelled domain text, JSONL |
| Cost | Only inference; longer prompts cost more tokens | Inference plus embeddings plus the vector store | Training job plus model storage plus provisioned throughput | Larger training job plus storage plus provisioned throughput |
| Time to change | Seconds | Minutes: re-sync the data source | Hours: a new training job | Hours to days |
| Choose when | Always first; most problems stop here | Answers depend on current or private information, and must be cited | Prompting cannot get the output format, tone or accuracy on a narrow task, and you have labelled examples | The model does not understand the field's terminology and you have a lot of text |
| Does not fix | Missing knowledge | Style, format, a skill the model lacks | Facts that change; hallucinations about current data | Task behaviour; current facts |
- Amazon Nova and Meta Llama are the models most often fine-tuned in Bedrock, because they are cheap to train and to host and their small sizes suit a narrow task.
- Legal and medical publishers are the textbook continued pre-training case: enormous corpora of domain text and a vocabulary the base model half knows.
- Distillation into Nova Micro or Claude Haiku is how teams cut the cost of a classifier that was prototyped on a large model and now runs on every message.
- Fine-tuning does not add knowledge reliably. A model fine-tuned on last quarter's FAQ will still make up this quarter's prices. Facts go in a Knowledge Base.
- The training data must be in the same region as the job, in S3, and the job's role must be able to read it and to write the output; a cross-region bucket is the usual failed-job cause.
- Not every model supports every method. Continued pre-training is Titan Text territory; check the catalogue's customisation column before promising it.
"Labelled examples", "specific task", "consistent output format or tone" is fine-tuning. "Unlabelled domain text", "industry terminology", "specialised vocabulary" is continued pre-training. "Current or proprietary information", "cite sources", "no training" is a Knowledge Base. "The fine-tuned model must run on provisioned throughput" is expected behaviour. And the order of cost is always prompt engineering, then RAG, then fine-tuning, then continued pre-training; the cheapest option that meets the requirement wins.
- fine-tuning
- Further training of a base model on labelled input and output pairs so it performs a specific task or adopts a style; in Bedrock a managed job over JSONL in S3.
- continued pre-training
- Further training on unlabelled domain text so the model learns the field's language; needs more data and produces a custom model in the same way.
- epoch
- One full pass over the training data; more epochs fit the data more closely, at the risk of over-fitting.
- custom model
- The private output of a customisation job, stored in your account and callable only through provisioned throughput.
- distillation
- Training a small student model on responses generated by a large teacher, to keep most of the quality at a fraction of the cost.
Model evaluation: automatic metrics, a model as judge, or people
Amazon Bedrock model evaluation is a managed job that measures how a model performs on a task against a dataset, in three styles: automatic scoring with built-in metrics, an evaluator model that judges responses, and human evaluation by your own team or one AWS manages.
The playground tells you what one model does on one prompt; an evaluation job tells you what it does on a thousand, with a number attached, so the model choice can be defended and repeated when a new version appears. The training article covers the metrics themselves (ROUGE, BLEU, BERTScore, F1) and the public benchmarks; this section is about the job.
| Automatic evaluation | Model as judge | Human evaluation | |
|---|---|---|---|
| Who scores | Built-in algorithms | A second foundation model you pick as the evaluator | People: your own work team, or an AWS managed team |
| Task types | General text generation, text summarisation, question answering, text classification | Any text generation task, including RAG output | Anything you can write instructions for |
| Metrics | Accuracy, robustness (does the answer survive small perturbations of the prompt) and toxicity, computed with metrics suited to the task (BERTScore and F1 for summarisation and question answering, classification accuracy, a toxicity classifier) | Rubric scores for correctness, completeness, faithfulness to the context, helpfulness, coherence, harmfulness, stereotyping, refusal | Preference between two models, Likert scales, thumbs up or down, ordinal ranking, against instructions you write |
| Dataset | Built-in public datasets per task, or your own JSONL of prompts with reference answers in S3 | Your own prompts, with or without reference answers | Your own prompts |
| Models per job | One | One per job; results are compared across jobs in the console | Up to two side by side (own team); scoped with AWS for a managed team |
| Cost and speed | Cheapest and fastest: only the inference is charged | Inference for the candidate and for the judge | Slowest and dearest; the AWS managed team is priced per engagement |
| Choose when | You need a quick, repeatable benchmark on a standard task | Quality is nuanced but you have no people to spare | Quality is subjective: brand voice, tone, domain judgement, safety review |
A Knowledge Base has its own evaluation job, RAG evaluation, with two modes: retrieval only, scored on context relevance and context coverage (did the right chunks come back), and retrieve-and-generate, scored on correctness, completeness, faithfulness (the hallucination metric), helpfulness, citation precision and coverage, and harmfulness. Results of every evaluation land in the console as a report and in S3 as JSON, so they can be compared across runs and pinned to a release.
- Choosing between Claude tiers before a launch is the everyday job: the same prompt set through Haiku and Sonnet, scored by a judge model, with the cost difference next to the quality difference.
- Regression testing a prompt change re-runs the evaluation dataset after every edit to the system prompt, the way unit tests run after every commit.
- Marketing and legal teams run human evaluation because "on brand" and "legally careful" are not metrics a formula computes.
- A built-in dataset measures a generic task. If your use case is unusual, a high score on a public summarisation set proves little; use your own prompts.
- The judge can share the candidate's blind spots. A judge model from the same family tends to like its relative's style; pick a different one, and spot-check with people.
- Human evaluation needs a work team. If the scenario says the company has no one to do it, the AWS managed team is the option.
"Compare models quickly with built-in metrics such as accuracy, robustness and toxicity" is automatic evaluation; "subjective quality, brand voice, expert judgement" is human evaluation; "no in-house reviewers" is the AWS managed team; "our own prompts and expected answers" is a custom dataset in S3. "Measure whether the Knowledge Base answers are faithful to the retrieved text" is RAG evaluation. Model evaluation happens before deployment; Guardrails act at request time; do not confuse the two.
- robustness
- How much a model's output changes when the input is perturbed slightly (typos, rewording); a metric in Bedrock's automatic evaluation.
- faithfulness
- Whether a generated answer is supported by the context it was given; the RAG evaluation metric for hallucination.
- work team
- The group of people who rate responses in a human evaluation job; your own employees, or a team AWS provides.
Builder tools: Prompt Management, Flows, Bedrock Studio and the smaller pieces
Around the core features Bedrock adds tools for the people building on it: Prompt Management to version prompts as resources, Flows to wire prompts, Knowledge Bases, Agents and code into a visual pipeline, and a team workspace so builders need not touch the AWS console.
Prompt Management
A prompt in Amazon Bedrock Prompt Management is a stored resource: the template text with {{variables}}, the model it targets, its inference parameters, and numbered versions. You test it in the console with sample variable values, publish a version, and reference the prompt's ARN as the modelId in Converse or InvokeModel, passing the variable values in the request, or drop it into a Flow. The point is that prompt text stops living in application code: it can be edited, reviewed and rolled back by the people who own the wording, and production pins a version.
Flows
Amazon Bedrock Flows (launched as Prompt Flows for Amazon Bedrock) is a visual builder for multi-step generative AI pipelines. A flow is a graph of nodes: input and output, prompt nodes (inline or from Prompt Management), Knowledge Base nodes, Agent nodes, Lambda nodes for custom code, an Amazon Lex node for a conversational front end, condition nodes for branching, iterator and collector nodes for loops, and S3 storage and retrieval nodes. You draw it, test it in the console, and invoke it with InvokeFlow through an alias, exactly as with an Agent. Where an Agent decides its own steps at run time, a Flow runs the steps you drew, which makes it the right tool for a fixed pipeline such as classify, then route, then answer.
flowchart TD
IN["Flow input<br/>the customer's message"]
PR["Prompt node<br/>classify the message, template from Prompt Management"]
CD{"Which kind?"}
KB["Knowledge Base node<br/>policy and product questions"]
AG["Agent node<br/>changes to an account or an order"]
LF["Lambda node<br/>anything else goes to a ticket"]
OUT["Flow output<br/>reply to the customer"]
IN --> PR
PR --> CD
CD -- "question" --> KB
CD -- "action" --> AG
CD -- "other" --> LF
KB --> OUT
AG --> OUT
LF --> OUT
InvokeFlow call for the application and one diagram for the team.Bedrock Studio
Amazon Bedrock Studio was launched as a web workspace where a team signs in through AWS IAM Identity Center and builds prototype applications with models, Knowledge Bases, Agents and Guardrails, in shared projects, without anyone needing IAM users or console access; its successor is Amazon Bedrock IDE inside Amazon SageMaker Unified Studio, which keeps the same purpose. When a question wants "a team of builders to experiment and share generative AI apps with single sign-on and without the AWS console", this is what it means; PartyRock is the public, no-account version for individuals.
The smaller pieces
- Amazon Bedrock Data Automation turns unstructured documents, images, audio and video into structured output (extracted fields, summaries, transcripts, scene descriptions) with one API, and doubles as an advanced parser for Knowledge Bases.
- Intelligent Prompt Routing sends each request to the cheaper or the stronger model within a family depending on how hard the prompt looks, to cut cost without a visible quality drop.
- Prompt caching reuses the processed prefix of a long repeated prompt (a big system prompt, a long document) at a discount and with lower latency on supported models.
- Latency-optimised inference is a per-request option on some models that returns tokens faster at a higher price, for the cases where a person is waiting.
- Amazon Bedrock Marketplace extends the catalogue with specialised models deployed onto endpoints you pay for by the hour but call through the Bedrock APIs.
- Product teams with a prompt owner keep the system prompt in Prompt Management so a copywriter can ship a wording change without a code deploy.
- Contact-centre pipelines are Flows: transcript in, a prompt node summarises, a condition node checks sentiment, a Lambda node files the summary, all drawn rather than coded.
- Cost-sensitive chat products put Intelligent Prompt Routing between Claude Haiku and Sonnet so short factual questions never pay the large model's price.
"Version and manage prompts centrally" is Prompt Management. "Visual, low-code workflow that chains prompts, Knowledge Bases and Lambda" is Flows. "Team workspace with single sign-on, no console" is Bedrock Studio (Bedrock IDE). "No AWS account at all, just try things" is PartyRock. "Extract structured data from documents, images, audio and video" is Bedrock Data Automation. A Flow follows steps you drew; an Agent chooses its steps.
- prompt variable
- A placeholder such as
{{customer_name}}in a managed prompt, filled in at invocation time. - node
- One step in a Flow: a prompt, a Knowledge Base query, an Agent call, a Lambda function, a condition or an input or output.
- prompt caching
- Reusing the model's processed state for a repeated prompt prefix so the repeated part is charged less and answered faster.
Logging and audit: invocation logs, CloudWatch metrics and CloudTrail
Bedrock records what happened in three places for three purposes: model invocation logging captures the prompts and responses themselves, CloudWatch metrics count and time the calls, and AWS CloudTrail records who made which API call, so an audit can answer what was asked, how much and by whom.
Model invocation logging
Model invocation logging is off by default, because prompts can carry personal data and AWS does not keep them unless you ask. You turn it on per account and region in the Bedrock settings, choosing Amazon CloudWatch Logs, Amazon S3 or both as the destination, and which data types to include (text, images, embeddings). Each record has the timestamp, the caller's account and identity, the region, the model identifier, the full request and response bodies, the inference parameters and the input and output token counts; payloads too large for a log event are written to S3 with a pointer in the log. This is the data behind a cost dashboard by team, a review of what users actually ask, a training set for distillation, and the evidence a compliance officer wants when a user reports an odd answer.
CloudWatch metrics
Bedrock publishes metrics to the AWS/Bedrock namespace without any setup: Invocations, InvocationLatency, InvocationClientErrors, InvocationServerErrors, InvocationThrottles, InputTokenCount, OutputTokenCount and OutputImageCount, by model identifier. Alarms on throttles tell you that on-demand quotas are being hit and provisioned throughput or cross-region inference should be considered; alarms on latency catch a slow model before users do.
CloudTrail and EventBridge
CloudTrail records Bedrock API calls as events: who created a guardrail, changed the logging configuration, started a customisation job or invoked a model, with the identity, time and source IP, but not the prompt or response content. Runtime calls to Agents and Knowledge Bases are data events that must be enabled on the trail. Amazon EventBridge receives state changes from long-running jobs (a customisation job finished, a batch inference job failed) so a pipeline can react without polling.
flowchart TD I["Every model invocation<br/>InvokeModel, Converse, the streaming variants"] L["Model invocation logging<br/>off by default, enabled per account and region"] CW["Amazon CloudWatch Logs<br/>prompt, response, model id, token counts"] S3["Amazon S3<br/>full bodies, large payloads, long retention"] CT["AWS CloudTrail<br/>who called which API, when, from where"] CM["CloudWatch metrics<br/>Invocations, InvocationLatency, token counts, throttles"] I --> L L --> CW L --> S3 I --> CT I --> CM
- Cost allocation dashboards in CloudWatch or QuickSight are built on
InputTokenCountandOutputTokenCountper model, joined with the invocation logs for the calling team. - Financial services audits pull CloudTrail to prove who changed a guardrail version and when, and invocation logs in S3 with Object Lock to prove what the assistant said.
- Distillation pipelines read invocation logs as their source of production prompts, which is why AWS lets a distillation job point at the logs directly.
- Logging is opt-in and the logs are your data. Once on, the prompts are stored in your account; a PII policy that forbids storing them applies to your logs, not to Bedrock.
- CloudTrail does not contain prompts. A question that needs the content of a request cannot be answered from CloudTrail; that is invocation logging.
- Throttling is an on-demand quota signal.
InvocationThrottlesrising means the account's tokens-per-minute or requests-per-minute quota for that model is being hit, not that the model is broken.
"Record the prompts and responses for review, compliance or analysis" is model invocation logging to CloudWatch Logs or S3. "Track who invoked the model or changed the configuration" is CloudTrail. "Monitor latency, error rate or token usage" is CloudWatch metrics. "Logging is not enabled by default" is a fact the exam checks.
- model invocation logging
- The opt-in Bedrock setting that writes each request and response, with metadata and token counts, to CloudWatch Logs or S3.
- data event
- A CloudTrail event for a high-volume runtime operation (here, Agent and Knowledge Base invocations) that must be switched on explicitly.
- throttle
- A rejected request because the account exceeded a per-model rate quota; counted in
InvocationThrottles.
Pricing: on-demand tokens, batch, provisioned throughput and the other line items
Bedrock is paid for in three modes, on-demand by the token, batch by the token at a discount, and provisioned throughput by the model unit per hour, plus a handful of separate charges for customisation, storage, Guardrails and the stores that Knowledge Bases use.
The stack article covered the cost trade-offs in general; this is the Bedrock price list in shape, without numbers, because the numbers change per model and the exam never asks for them.
| Mode | You pay for | Latency | Fits | Not for |
|---|---|---|---|---|
| On-demand | Input tokens and output tokens, priced separately per model, with output the dearer; images per image; embeddings per input token. No commitment. | Interactive; shared capacity with per-account rate quotas | Getting started, variable or unpredictable traffic, most applications | Custom models (not allowed); heavy steady load with a strict latency target |
| Batch inference | The same tokens at a discount (about half the on-demand price on supported models). Prompts go in as a JSONL file in S3; results come out as a file in S3. | Hours; the job runs when capacity allows | Bulk jobs with nobody waiting: embedding a corpus, summarising an archive, classifying a backlog, generating evaluation data | Anything a user is waiting for |
| Provisioned throughput | Model units, each a fixed number of input and output tokens per minute for a model, billed per hour; no commitment, or a one- or six-month commitment at a lower hourly rate | Interactive with guaranteed capacity | Predictable heavy production traffic, a latency SLA, and every custom model | Low or bursty traffic: units bill whether or not they are used |
The other line items
- Customisation: a training charge per token processed (tokens in the training data times epochs), then custom model storage per model per month, then provisioned throughput to serve it. Custom Model Import instead bills custom model units in five-minute windows while the model is active.
- Knowledge Bases: no charge for the feature itself, but the embedding model's tokens at ingestion and query time, the generation model's tokens, and the vector store (OpenSearch Serverless compute units, Aurora instances, a partner's subscription).
- Agents and Flows: no separate charge; you pay for the model tokens each step uses and for the Lambda functions they call.
- Guardrails: per text unit (a block of characters) per policy type applied; word filters are free, the content, denied-topic, sensitive-information and grounding policies are metered.
- Model evaluation: the inference the job performs, plus the human work team's time if it is AWS's.
- Levers that cut the bill: a smaller model, shorter prompts, a lower maximum output, prompt caching, Intelligent Prompt Routing and batch for anything offline.
Cross-region inference
A cross-region inference profile lets Bedrock route a request to any region within a geography (the US regions, the EU regions, the Asia Pacific regions) that has capacity, which raises the throughput you can get on demand and absorbs bursts without provisioned units. It is priced at the source region's rate with no extra charge, the request and response are processed in whichever region served them, logs stay in the source region, and the data never leaves the geography, which is the fact a data protection review needs. Some models also offer a global profile that routes worldwide. When a scenario says "on-demand throttling during peaks" and "no reserved capacity", a cross-region profile is the answer.
- Overnight batch jobs that embed or summarise a whole document store are how teams get the discount; the JSONL goes into S3 at midnight and the results are there in the morning.
- Consumer apps before a launch buy provisioned throughput for the weeks a spike is expected and let it lapse afterwards.
- EU companies use the EU cross-region profile to spread load across European regions while the compliance statement stays "data processed in the EU".
- Output tokens cost more than input tokens. A verbose model with a generous
maxTokensis where bills grow; a long system prompt is re-sent every turn and is the other place. - Batch is a different mode, not slow on-demand. It has an S3 input file and a turnaround in hours; never propose it for a chat interface.
- Provisioned throughput bills while idle. Size the commitment to the steady part of the load and leave bursts to on-demand or a cross-region profile.
"Unpredictable or low traffic", "pay only for what you use" is on-demand. "Large volume, not time-sensitive, lowest cost" is batch inference. "Consistent high throughput", "guaranteed capacity", "custom or fine-tuned model" is provisioned throughput. "Throttled during peaks without buying capacity" is cross-region inference. "Reduce the cost of a chat application" is a smaller model, shorter prompts, a lower output cap and prompt caching. Input and output tokens are priced separately.
- model unit
- The unit of provisioned throughput: a fixed rate of input and output tokens per minute for one model, billed per hour.
- batch inference
- A job that processes a JSONL file of prompts from S3 and writes the results to S3, at a discount, in hours.
- text unit
- The metering unit for Guardrails: a block of characters of input or output that each policy is charged against.
- cross-region inference profile
- A model identifier that lets Bedrock serve the request from any region in a geography, for more throughput at the source region's price.
Security and compliance: IAM, KMS, PrivateLink and the certifications
Bedrock's security model is the standard AWS one applied to a model API: IAM decides who may call which model and feature, KMS encrypts what Bedrock stores, PrivateLink keeps the traffic off the internet, and the service sits inside the compliance programmes a regulated customer needs.
Identity and access
Every Bedrock call is authorised by IAM. Identity-based policies grant actions such as bedrock:InvokeModel, bedrock:InvokeModelWithResponseStream, bedrock:Retrieve or bedrock:InvokeAgent on resources: foundation models have ARNs, so a policy can allow one team only the small models, and custom models, Knowledge Bases, Agents, Guardrails and provisioned throughput each have their own. Condition keys can require that a guardrail is attached to every invocation. The features that act on your behalf (a Knowledge Base reading S3 and writing to OpenSearch, an Agent calling Lambda, a customisation job reading training data) each use a service role you create with only those permissions. The security article covers the wider governance picture; the shape here is least privilege per feature.
Encryption
Traffic is encrypted in transit with TLS. At rest, anything Bedrock keeps for you (custom models, imported models, Knowledge Base configuration, Agent definitions, evaluation job output) is encrypted with AWS-owned keys by default and with a customer managed AWS KMS key where you specify one, which gives you the key policy, rotation and the CloudTrail record of every use of it. Training data, batch input and invocation logs stay in your own S3 buckets and log groups under the encryption you set there, with a KMS key of your choice for the logs.
Network
By default an application reaches Bedrock over the public AWS endpoints, still authenticated and encrypted. For a private path you create VPC interface endpoints powered by AWS PrivateLink for the services you use: bedrock, bedrock-runtime, bedrock-agent and bedrock-agent-runtime each have one. Traffic then flows from a private subnet to Bedrock over the AWS network with no internet gateway, no NAT gateway and no public IP in the path, and an endpoint policy can restrict which principals and models may be reached through it. Customisation jobs can be given a VPC configuration so the training job reads S3 through your subnets, and a Knowledge Base on Aurora connects to the database inside your VPC.
flowchart TD A["Application, private subnet<br/>no internet or NAT gateway"] E["VPC interface endpoint<br/>AWS PrivateLink, one per Bedrock endpoint"] P["Endpoint policy and IAM role<br/>which principals, which models, which actions"] B["Amazon Bedrock, your region<br/>TLS in transit, KMS at rest"] A --> E E --> P P --> B
Data handling and compliance
The data promise from the first section is the core of the compliance story: prompts and completions are not stored (unless you log them), are not shared with model providers, are not used to train base models, and are processed in the region you called, or within the geography for a cross-region profile. On top of that, Bedrock is in scope for the major AWS compliance programmes: it is HIPAA eligible, covered by the SOC reports, certified under ISO standards, in scope for PCI DSS, usable under the GDPR with AWS's data processing terms, and authorised at FedRAMP High in the GovCloud regions. The exact lists live in AWS Artifact, which is where an auditor is sent for the reports. What that scope means in practice is that a hospital can run patient-facing summarisation through Bedrock under a Business Associate Addendum, a bank can process card-holder conversations, and an EU company can keep processing inside EU regions.
- Healthcare providers run clinical note summarisation on Bedrock through PrivateLink endpoints, with invocation logging to a KMS-encrypted bucket, which is the architecture AWS publishes for HIPAA workloads.
- Banks in the EU pair the EU cross-region profile with customer managed keys and IAM conditions that require a guardrail on every call.
- Public sector agencies in the United States use Bedrock in the GovCloud regions under the FedRAMP High authorisation.
- HIPAA eligible is not HIPAA compliant. The service can be used for protected health information under a Business Associate Addendum; the customer's architecture and controls still have to be compliant. The same applies to every programme on the list.
- A VPC endpoint does not replace IAM. It changes the network path; the caller still needs permission, and the endpoint policy narrows rather than grants.
- Bedrock does not need to be "in your VPC". Unlike a SageMaker endpoint, there is no Bedrock instance to place; PrivateLink is how a VPC reaches it privately.
"Traffic must not traverse the public internet" is a VPC interface endpoint with AWS PrivateLink. "Control who can invoke which model" is IAM. "Encrypt with keys we control" is a customer managed KMS key. "Data must stay in our region and not be used for training" is Bedrock's default behaviour. "Compliance reports for the auditor" is AWS Artifact. "Protected health information" is fine on Bedrock because it is HIPAA eligible, under a Business Associate Addendum.
- AWS PrivateLink
- The technology behind VPC interface endpoints: a private network interface in your subnet that fronts an AWS service, so traffic never leaves the AWS network.
- endpoint policy
- An IAM resource policy on a VPC endpoint that limits which principals, actions and resources may pass through it.
- service role
- An IAM role that Bedrock assumes to act for you: read training data, write to a vector store, invoke a Lambda function.
- HIPAA eligible
- An AWS service that may process protected health information under a Business Associate Addendum; the customer remains responsible for compliant use.
Recap
- Amazon Bedrock is a fully managed, serverless service that offers foundation models from Amazon (Titan, Nova), Anthropic, Meta, Mistral AI, Cohere, AI21 Labs and Stability AI behind a single API; prompts and completions are not used to train the models, never reach the providers, are encrypted, and stay in your region.
- Know the modality per family: Titan Text Embeddings and Cohere Embed make vectors; Titan Image Generator, Nova Canvas and Stability AI make images; Nova Reel makes video; Nova Sonic is speech; Claude, Llama, Mistral, Command and Jamba generate text; Nova Micro is text only.
- Models are enabled per account and region and gated by IAM; the playgrounds (chat and text, image, video) are for trying models by hand.
- Four endpoints:
bedrock(control),bedrock-runtime(InvokeModel, Converse, streaming, ApplyGuardrail),bedrock-agent(build) andbedrock-agent-runtime(Retrieve, RetrieveAndGenerate, InvokeAgent, InvokeFlow). InvokeModelsends the provider's own JSON;Conversesends one format to every conversational model; each has a streaming variant. Temperature, top-p, top-k, maximum tokens and stop sequences shape the output without touching the model.- Knowledge Bases are managed RAG: data sources (S3, web, Confluence, SharePoint, Salesforce), a chunking strategy (default, fixed, hierarchical, semantic, none, custom), an embedding model, and a vector store (OpenSearch Serverless by default; Aurora pgvector, Neptune Analytics for GraphRAG, Pinecone, Redis, MongoDB Atlas);
Retrievereturns chunks,RetrieveAndGeneratereturns a cited answer. - Agents run the plan, act, observe loop: instructions, a model, action groups defined by an OpenAPI schema or function details and executed by Lambda or return of control, Knowledge Bases as tools, session and long-term memory, a trace for debugging.
- Guardrails apply content filters (with strength levels and prompt attack detection), denied topics, word filters, sensitive information filters (block or mask PII) and contextual grounding checks to input and output, on any model, agent or Knowledge Base, and to any text through
ApplyGuardrail. - Fine-tuning uses labelled prompt and completion pairs in JSONL on S3 to teach a task; continued pre-training uses unlabelled domain text to teach vocabulary; both produce a private custom model that must run on provisioned throughput.
- Model evaluation is automatic (accuracy, robustness, toxicity on built-in or custom datasets), model as judge, or human with your own work team or an AWS managed team; RAG evaluation scores retrieval and faithfulness for Knowledge Bases.
- Prompt Management versions prompts as resources; Flows draw pipelines of prompt, Knowledge Base, Agent, Lambda and condition nodes; Bedrock Studio, now Bedrock IDE in SageMaker Unified Studio, is the team workspace.
- Model invocation logging (off by default) writes prompts and responses to CloudWatch Logs or S3; CloudWatch metrics count invocations, latency, tokens and throttles; CloudTrail records who called which API, without content.
- Pricing: on-demand per input and output token, batch inference at a discount for offline jobs, provisioned throughput in model units for steady load and for every custom model, plus training tokens, custom model storage, Guardrails text units and the vector store; cross-region inference adds throughput at the source region's price.
- Security is IAM for access, KMS for keys, VPC interface endpoints over PrivateLink for a private path, and a compliance scope that includes HIPAA eligibility, SOC, ISO, PCI DSS, GDPR and FedRAMP High.
Questions
Answers stay folded; say yours out loud first, then open the answer and compare.
What is Amazon Bedrock, in one sentence, and what does it promise about your data?
Bedrock is a fully managed, serverless service that offers foundation models from Amazon and several other providers behind a single API, and it promises that your prompts and completions are never used to train the base models, never shared with the providers, are encrypted in transit and at rest, and stay in the region you called.
- Serverless means no instances, endpoints or scaling to manage; you pay per token, image or reserved model unit.
- The single API means a model change is a change of identifier, not a rewrite.
- Around the models sit Knowledge Bases, Agents, Guardrails, customisation, evaluation and logging.
Nothing is stored unless you turn on model invocation logging yourself, and then it is stored in your own account.
A company needs to generate product images, another needs vectors for semantic search, a third needs a model for a complex multi-step reasoning agent. Which Bedrock model families fit?
Images come from Amazon Titan Image Generator, Amazon Nova Canvas or Stability AI's Stable Diffusion and Stable Image models; embeddings come from Amazon Titan Text Embeddings V2 or Cohere Embed; the reasoning agent would typically use Anthropic Claude.
- Titan and Nova are Amazon's own families; the rest are partner models hosted by Bedrock.
- Embedding models return vectors and cannot write text; image models cannot answer questions.
- Nova Micro is text only; Nova Lite and Pro take images and video too.
Meta Llama and Mistral are the open-weights families to name when the same model must also run outside AWS.
What is the difference between InvokeModel and the Converse API, and when do you need the streaming variants?
InvokeModel sends the provider's native JSON body, so each model has its own request and response shape; Converse sends one uniform format (system, messages, inferenceConfig, toolConfig) to every conversational model, so switching models is a one-string change; InvokeModelWithResponseStream and ConverseStream return the answer as an event stream for interfaces that show text as it is generated.
- Embedding and image models still use InvokeModel because they have no chat shape.
- Converse returns a
stopReasonand ausageblock with token counts, handy for cost tracking. - Provider-specific parameters such as top-k go in
additionalModelRequestFields.
The modelId can also be a custom model ARN, a provisioned throughput ARN, a managed prompt ARN or a cross-region inference profile.
Users complain that a Bedrock-based assistant gives a different answer every time to the same factual question. What do you change?
Lower the temperature towards 0 (or tighten top-p), which makes the model take the most likely tokens and gives repeatable answers; no retraining is involved.
- Temperature flattens or sharpens the next-token distribution; 0 is greedy decoding.
- Adjust temperature or top-p, not both, to keep the effect predictable.
- If the answers are also wrong, that is a knowledge problem for a Knowledge Base, not a sampling problem.
A distractor that proposes fine-tuning to remove randomness is wrong: sampling parameters are set per request.
A company wants an assistant that answers from its own policy documents in S3, cites the source and needs no model training. Which Bedrock feature, and which two APIs does it offer?
Amazon Bedrock Knowledge Bases, which ingests, chunks, embeds and indexes the documents into a vector store and then answers through RetrieveAndGenerate, which returns an answer with citations, or Retrieve, which returns just the matching chunks for your own prompt.
- Data sources: S3, a web crawler, Confluence, SharePoint, Salesforce or a custom feed.
- Embedding model: Titan Text Embeddings V2 or Cohere Embed; vector store: OpenSearch Serverless by default.
- A sync job keeps the index current; nothing is retrievable before the first sync.
A sessionId on RetrieveAndGenerate carries conversation context across follow-up questions.
Which vector stores can a Knowledge Base use, and which one would you pick for GraphRAG or for keeping vectors next to relational data?
Amazon OpenSearch Serverless (the default), Amazon OpenSearch Service, Amazon Aurora PostgreSQL with pgvector, Amazon Neptune Analytics, Pinecone, Redis Enterprise Cloud, MongoDB Atlas and the newer Amazon S3 Vectors; Neptune Analytics is the GraphRAG choice and Aurora PostgreSQL is the one for vectors beside relational data.
- "Quick create" builds the OpenSearch Serverless collection for you.
- Neptune Analytics lets retrieval follow relationships between entities extracted at ingestion.
- The partner stores are for companies that already run them.
The embedding model is fixed when the Knowledge Base is created; changing it means re-indexing into a new one.
Explain the chunking strategies a Knowledge Base offers and when hierarchical or semantic chunking helps.
Default chunking splits into fixed pieces of about 300 tokens; fixed-size lets you set the token count and overlap; hierarchical keeps small child chunks under larger parents so matching is precise but the model gets the surrounding context; semantic breaks where the meaning shifts; no chunking treats each file as one chunk; and a custom Lambda transformation lets you split any way you like.
- Hierarchical suits manuals and contracts where a matching sentence needs its section to make sense.
- Semantic suits documents that mix topics within a page, so fixed boundaries keep cutting ideas in half.
- Chunks too small lose context; chunks too large dilute the match and fill the context window.
Re-chunking means re-syncing the data source, which re-embeds and rewrites the index.
A customer wants an assistant that checks an order, changes the delivery date through an existing API and confirms by message. Which Bedrock feature, and what are its parts?
Amazon Bedrock Agents: instructions in plain language, a foundation model that plans, action groups that define the operations by an OpenAPI schema or function details and are executed by AWS Lambda (or handed back through return of control), optional Knowledge Bases for facts, a Guardrail, and session memory keyed by a sessionId.
- The loop is reason, act, observe: the model picks a tool, Bedrock runs it, the result is appended, the model continues.
- Operations can require user confirmation before they run, which suits changing a delivery.
- Enable the trace to see every step when debugging odd behaviour.
Multi-agent collaboration adds a supervisor that delegates to specialist agents when one instruction set gets too long.
What is return of control in an action group, and when would you use it instead of a Lambda function?
Return of control makes Bedrock hand the operation the agent chose, with its parameters, back to the calling application in the response instead of invoking Lambda, so your own code executes it and sends the result in the next InvokeAgent call.
- Use it when the action must run in your own system, behind your own network or with the user's own credentials.
- It also suits actions that need a human step in between, such as approval.
- Lambda is the default when the action can run server-side with a service role.
Either way the OpenAPI or function descriptions are what the model reads to pick the operation, so they must be written carefully.
Name the Guardrails policy types and say which one addresses each of these: a banking bot must not give investment advice, card numbers must not appear in transcripts, and answers must not go beyond the retrieved documents.
The policy types are content filters (with strength levels and prompt attack detection), denied topics, word filters, sensitive information filters, contextual grounding checks and automated reasoning checks; investment advice is a denied topic, card numbers are a sensitive information filter set to mask or block, and staying within the documents is the contextual grounding check.
- Policies run on input and output; grounding and automated reasoning run on output only.
- The same guardrail works with any model, an Agent or a Knowledge Base, and versions are pinned in production.
- When a policy fires the response is replaced by your blocked message and
stopReasonisguardrail_intervened.
Grounding checks need a source to compare against, so they pair with a Knowledge Base or with RAG you built.
How would you apply a Bedrock guardrail to a model that is hosted on a SageMaker endpoint rather than on Bedrock?
Call the ApplyGuardrail API with the text: it runs the guardrail's policies over any input or output you pass it, independent of a model call, so the same policy can wrap a SageMaker endpoint, a third-party API or a legacy chatbot.
- Call it once on the user's prompt and once on the model's response.
- It returns the same assessment and blocked message as a guardrail attached to a Bedrock call.
- Pricing is the same per text unit per policy.
This is how a company keeps one safety policy across every model it runs, which is the exam's "consistent safeguards across models" phrase.
What is the difference between fine-tuning and continued pre-training in Bedrock, what data does each need, and what do they both produce?
Fine-tuning trains on labelled prompt and completion pairs to teach a task, format or tone; continued pre-training trains on unlabelled domain text to teach vocabulary and style; both are JSONL files in S3 fed to a managed job and both produce a private custom model in your account that must be served on provisioned throughput.
- Hyperparameters are epochs, batch size, learning rate and warm-up steps; the job writes training and validation loss to S3.
- Continued pre-training needs far more data and is supported on fewer models, notably Amazon Titan Text.
- Neither adds current facts reliably; a Knowledge Base does that.
The bill has three parts: training tokens times epochs, monthly model storage, and the provisioned throughput for as long as the model is callable.
A team fine-tuned a model in Bedrock and now gets an error calling it on demand. Is that a bug?
No: custom models cannot be invoked on demand and must be hosted on provisioned throughput, bought in model units by the hour with no commitment or with a one- or six-month commitment.
- The
modelIdfor the call becomes the provisioned throughput's ARN. - Units bill while idle, which is why a rarely used fine-tuned model is usually the wrong design.
- Base models can be provisioned too, for guaranteed throughput.
Custom Model Import is the exception in spirit: imported open-weights models run on demand and bill in custom model units only while active.
Compare Bedrock's automatic and human model evaluation: who scores, which metrics, and when is each the right choice?
Automatic evaluation scores a model with built-in algorithms on accuracy, robustness and toxicity for text generation, summarisation, question answering and classification, using built-in or custom datasets; human evaluation has your own work team or an AWS managed team rate responses on criteria you define; use automatic for a fast, cheap, repeatable benchmark and human when quality is subjective, such as brand voice or expert judgement.
- A third style uses a judge model to score correctness, faithfulness, helpfulness and harmfulness with a rubric.
- Human jobs with your own team compare up to two models side by side.
- RAG evaluation scores a Knowledge Base on retrieval quality and on the faithfulness of generated answers.
Evaluation happens before deployment; Guardrails act on every request afterwards.
What is the difference between Bedrock Flows and Bedrock Agents, and where does Prompt Management fit?
A Flow runs a fixed pipeline you drew as nodes (prompt, Knowledge Base, Agent, Lambda, condition, Lex, iterator), while an Agent decides its own steps at run time by reasoning over tools; Prompt Management stores versioned prompt templates with variables that a Flow's prompt node or an application's Converse call can reference by ARN.
- Flows suit "classify, then route, then answer"; Agents suit open-ended tasks with API calls.
- Both are invoked through an alias so production is pinned to a tested version.
- Prompt Management moves prompt text out of code so the wording owner can change it.
Bedrock Studio, now Bedrock IDE in SageMaker Unified Studio, is where a team builds all three with single sign-on and no console access.
A compliance team wants to review the exact prompts and responses of a Bedrock application and know who changed its guardrail. Which features, and what is on by default?
Turn on model invocation logging to CloudWatch Logs and S3 for the prompts, responses, model identifiers and token counts, and use AWS CloudTrail, which is already recording, for who created or changed the guardrail and when; invocation logging is off by default, CloudTrail is on.
- CloudTrail never contains prompt or response content.
- CloudWatch metrics in the
AWS/Bedrocknamespace give invocations, latency, token counts and throttles with no setup. - Agent and Knowledge Base runtime calls are CloudTrail data events that must be enabled.
Once logging is on, the prompts are your data in your account, so your own PII and retention policies apply to them.
Choose the Bedrock pricing mode for each: a new chatbot with unpredictable traffic; summarising ten years of reports overnight; a production API with steady heavy load and a latency SLA.
On-demand for the chatbot (pay per input and output token, no commitment), batch inference for the reports (JSONL in S3, results in S3, discounted, hours of turnaround), and provisioned throughput for the production API (model units per hour with a commitment for a lower rate, guaranteed capacity).
- Output tokens cost more than input tokens; long system prompts are re-sent every turn.
- Provisioned throughput is also mandatory for custom models.
- Cross-region inference adds on-demand throughput during peaks at the source region's price.
Guardrails, custom model storage, training tokens and the Knowledge Base's vector store are separate line items on top of the mode.
An application in a private subnet must call Bedrock without any traffic crossing the internet, and the security team wants control of the encryption keys. What do you set up?
Create VPC interface endpoints (AWS PrivateLink) for bedrock-runtime and any other Bedrock endpoints used, with an endpoint policy that limits principals and models, and specify customer managed AWS KMS keys wherever Bedrock stores data for you, such as custom models, Knowledge Bases, Agents and invocation logs.
- No internet gateway or NAT gateway is needed; the endpoint is a network interface in your subnet.
- IAM on the caller still grants the actions; the endpoint policy only narrows.
- Traffic is TLS in transit regardless of path.
Bedrock is HIPAA eligible and in scope for SOC, ISO, PCI DSS, GDPR and FedRAMP High, with the reports available in AWS Artifact, which is what the security team will ask for next.