AWS-112 · Lesson 8 of 12 · 19 min
Amazon Bedrock and its model choice
▶ Video coming soon A video version of this lesson is on the way.
By the eighth AI hour the overnight summary tests had outgrown Kwame's personal trial account. Hannah Weiss would not allow real call notes, even de-identified ones, anywhere outside Cascade Ridge's own AWS accounts. Gwen Halvorsen, the cloud architect running the AWS move, joined the session to show how the group would use generative AI inside the environment she had already built. "We are not going to sign up for another website," she said. "We are going to call models from our own account, with our own permissions, logs and encryption keys. That is what Amazon Bedrock is for."
This lesson introduces Amazon Bedrock, AWS's managed service for building with foundation models. It covers how Bedrock offers models from many providers through one API, what happens to the data you send, the main features built around the models, and how Bedrock compares with Amazon SageMaker AI and SageMaker JumpStart for teams that want more control. It also introduces the agent-building tools named in the exam guide: Amazon Bedrock AgentCore and the Strands Agents framework.
What Amazon Bedrock is
Amazon Bedrock is a fully managed service that gives access to foundation models through an API. There are no servers to provision or patch and no models to download; you choose a model, send a request and receive a response. In the language of earlier AWS courses, Bedrock sits high on the shared responsibility model: AWS runs the infrastructure and the models, and the customer is responsible for its data, its permissions and how it uses the output.
Three characteristics define Bedrock for the exam.
- Model choice. Bedrock offers models from Amazon, including the Nova family, and from many other providers, such as Anthropic, Meta, Mistral AI, Cohere and others. You can compare and switch models without rebuilding your application.
- A single API. The same request format, through the Bedrock Converse API, works across many text models, so swapping one model for another is often a one-line change.
- Serverless consumption. You pay for what you use, usually per input and output token, with options for batch processing and reserved capacity described in lesson 10.
Choosing and enabling models
Bedrock's model catalog in the console lists the available models with their providers, modalities, context windows, supported features and Regions. Each model also has a model card describing its intended uses and limits. Before an account can call some models, an administrator may need to accept the provider's terms or request access, so organizations can control which models staff are allowed to use. Gwen restricted the group's development account to three text models and one embedding model, all available in Canada (Central), using IAM policies so no one could call an unapproved model.
A playground in the console lets people try models interactively, adjusting temperature and other settings and comparing models side by side, before writing any code. Jonah ran his twenty test notes through two candidate models in the playground first, which took an afternoon rather than a week.
# Calling a model through the Bedrock Converse API from the AWS CLI (illustrative).
# The model ID and Region are examples; check the model catalog for current IDs.
aws bedrock-runtime converse \
--region us-west-2 \
--model-id example.text-model-v1 \
--messages '[{"role": "user", "content": [{"text": "Summarize this call note: ..."}]}]' \
--inference-config '{"temperature": 0.2, "maxTokens": 300}'What happens to your data
Hannah's first question was where the call notes would go. AWS's answers, from the Bedrock documentation and FAQ, satisfied her checklist, and they are the answers the exam expects.
- No training on your content. AWS states that the content you send to Bedrock, prompts and responses, is not used to improve the base models and is not shared with model providers.
- Providers have no access. Models run in AWS-operated accounts that model providers cannot access, so providers cannot see customer prompts, responses or logs.
- Regional storage. Customer content is stored at rest in the Region where you use Bedrock. Cross-Region inference, covered in lesson 4, can route processing to other Regions in a defined set, so it must be chosen deliberately.
- Encryption. Data is encrypted in transit and at rest, and customers can use their own AWS KMS keys.
- Private connectivity and logging. Applications can reach Bedrock through AWS PrivateLink without crossing the public internet, AWS CloudTrail records API calls, and optional invocation logging stores prompts and responses in the customer's own S3 bucket or CloudWatch Logs for auditing.
Hannah's conclusion was the shared responsibility model again. AWS protects the service and makes those commitments. Cascade Ridge decides who may call which model, whether invocation logs are kept and who can read them, what data is sent, and what is done with the output. She also recorded which Regions any inference profile could use, to keep the group's promise that client information is processed in Canada.
Features built around the models
Bedrock is more than a gateway to models. The exam expects you to recognize its main features by what they do.
| Feature | What it does |
|---|---|
| Knowledge Bases | Managed retrieval augmented generation: connects data sources, chunks and embeds documents, stores vectors, and retrieves relevant passages for answers with citations |
| Guardrails | Configurable safeguards: content filters, denied topics, word filters, sensitive information filters, contextual grounding and Automated Reasoning checks |
| Agents and AgentCore | Build agents that plan, call tools and APIs, and keep memory; AgentCore runs and secures agents in production |
| Flows and prompt management | Store, version and test prompts; chain prompts, models and other steps into workflows |
| Model evaluation | Compare models and prompts with automatic, model-based or human evaluation on your dataset |
| Customization | Fine-tune supported models, distill a large model into a smaller one, or import custom models |
| Batch inference | Process many requests asynchronously at a lower price than on-demand for supported models |
For the procedure manual tool, Knowledge Bases would handle chunking, embeddings and retrieval, and Guardrails would block off-topic requests and check that answers are grounded in the manual. For the overnight summaries, batch inference at the end of each shift was a candidate for cutting cost.
Agents and agentic AI
The exam guide asks for foundational agentic AI concepts. An agent is an application in which a model does more than answer: it plans steps toward a goal, decides which tools to call (such as an API that checks appointment availability), reads the results, and continues until the task is done. Agents usually keep memory, short-term for the current conversation and sometimes long-term across sessions, and follow an orchestration loop that coordinates the model, tools and memory.
- Tool use, also called function calling: the model returns a structured request to call a named tool with arguments, the application runs the tool, and the result goes back to the model.
- Model Context Protocol (MCP): an open standard for connecting agents to external systems. A system exposes its tools and data through an MCP server, and any MCP-compatible agent can use them without custom integration code.
- Multi-agent systems: several specialized agents cooperate, for example one that gathers information and one that drafts a reply, coordinated by a supervisor agent or by passing messages in a defined pattern.
On AWS, Strands Agents is an open-source framework for writing agents in code with a model, a prompt and a list of tools. Amazon Bedrock AgentCore provides the managed pieces needed to run agents in production, such as a runtime, memory, identity, tool gateways and observability, and works with Strands and other open-source frameworks. Gwen was cautious: agents that take actions, like booking or cancelling appointments, multiply the consequences of a model error. Any Cascade Ridge agent would start with read-only tools, as the course on building applications explains.
Amazon Bedrock or SageMaker AI?
AWS offers a second route to foundation models. Amazon SageMaker AI is the platform for building, training and deploying machine learning models of all kinds, the service behind the no-show model. Its SageMaker JumpStart hub offers hundreds of pre-trained models, including many open-weight foundation models, that you can deploy to an endpoint in your own account with a few clicks and fine-tune with your own data.
| Amazon Bedrock | SageMaker AI with JumpStart | |
|---|---|---|
| Infrastructure | Serverless; AWS manages everything | You choose instances and manage endpoints |
| Models | Curated catalog from Amazon and many providers | Large hub of open-weight and other models, plus your own |
| Pricing | Mainly per token, or reserved throughput | Mainly per instance hour while endpoints run |
| Customization | Supported fine-tuning and distillation | Full control over training and deployment |
| Skills needed | Application developers | Machine learning engineers |
For Cascade Ridge, Bedrock was the obvious starting point: no machine learning engineers on staff, modest volumes, and a need to move quickly. SageMaker AI would come back into the picture only if the group needed a model Bedrock does not offer or wanted full control over hosting.
Other AWS services for building
The exam guide also names AWS services that bring generative AI to people who are not building applications. Amazon Quick is an AI assistant for work that connects to company data, answers questions and automates tasks, and Kiro is an AI development environment for software teams. Lesson 9 covers both, along with their predecessors in the Amazon Q family. AWS also offers task-specific AI services, such as Amazon Transcribe, Translate, Comprehend and Textract, which often solve a narrow problem more cheaply and predictably than a general foundation model.
# Rough comparison: serverless per-token pricing vs a self-hosted endpoint.
# All prices are illustrative, not current AWS prices.
requests_per_month = 3000 # overnight call summaries
tokens_in, tokens_out = 900, 200 # per summary
price_in, price_out = 0.0008, 0.0032 # USD per 1,000 tokens (illustrative)
endpoint_per_hour = 1.50 # USD per instance hour (illustrative)
serverless = requests_per_month * (tokens_in / 1000 * price_in + tokens_out / 1000 * price_out)
always_on = endpoint_per_hour * 24 * 30
print(f"serverless per-token: about {serverless:.2f} USD a month")
print(f"self-hosted endpoint running all month: about {always_on:.2f} USD")serverless per-token: about 4.08 USD a month self-hosted endpoint running all month: about 1080.00 USD
What this code does
It compares two ways of paying for a model with illustrative prices: serverless pricing per thousand input and output tokens for 3,000 summaries a month, and a self-hosted endpoint billed for every hour of the month. It prints both monthly totals. For a small, occasional workload the per-token option costs a few dollars, while the always-on endpoint costs over a thousand.
The comparison was lopsided at Cascade Ridge's volume, which is typical: serverless per-token pricing suits modest or uneven usage, while a dedicated endpoint becomes worthwhile only at high, steady volume or when a specific model must be self-hosted.
Common mistakes
MistakeThinking Bedrock trains providers' models on customer prompts.
InsteadAWS states that Bedrock content is not used to improve base models or shared with providers.
MistakeAssuming Bedrock requires managing servers or GPUs.
InsteadBedrock is serverless; SageMaker AI endpoints are where you manage instances.
MistakeBelieving cross-Region inference never moves processing between Regions.
InsteadIt routes requests across a defined set of Regions; choose profiles that match data residency needs.
MistakeGiving an agent write access to business systems on day one.
InsteadStart agents with read-only tools and add actions only with safeguards and review.
One last practical note on Bedrock: the service changes quickly. New models arrive, older versions are retired on published schedules, and features move from preview to general availability. Gwen set a quarterly reminder to review the model catalog and the retirement notices for any model the group uses, so that a scheduled retirement never becomes a surprise outage.
Worked problem
Choosing the platform
Cascade Ridge wants (a) summaries of overnight calls using a commercial text model, at about 3,000 requests a month, and (b) one day, an experimental open-weight vision model that Bedrock does not offer, fine-tuned on radiograph quality labels. Which platform fits each?
Show solution
- (a) needs a hosted text model, modest volume, no ML engineers: Amazon Bedrock, paying per token.
- (a) can also use Bedrock batch inference at shift end and Guardrails for checks.
- (b) needs a model outside the Bedrock catalog and custom training: SageMaker AI with JumpStart or a custom deployment.
- (b) would run on endpoints the group manages, so it needs more skills and budget.
Answer: (a) Amazon Bedrock; (b) Amazon SageMaker AI, using JumpStart if the model is in its hub.
Summary and key terms
- Amazon Bedrock is a fully managed, serverless service that offers foundation models from Amazon and many other providers through a single API, such as the Converse API.
- Administrators control which models can be used, and a playground lets people compare models before coding.
- AWS states that Bedrock content is not used to improve base models or shared with providers, that providers cannot access customer prompts, that content is stored in the Region of use, and that data is encrypted; customers still control permissions, logging, data sent and use of output.
- Bedrock features include Knowledge Bases, Guardrails, agents with AgentCore, prompt management and flows, model evaluation, customization and batch inference.
- Agents plan, call tools, keep memory and can connect to systems through the Model Context Protocol; Strands Agents is an open-source framework for building them.
- SageMaker AI and JumpStart offer more control and more models, at the cost of managing endpoints.
- Amazon Bedrock
- AWS's fully managed service for using foundation models through an API.
- Converse API
- A consistent Bedrock API for sending messages to many different models.
- Model catalog
- The Bedrock listing of available models, providers, features and Regions.
- Agent
- An application in which a model plans steps, calls tools and uses memory to complete a task.
- Model Context Protocol (MCP)
- An open standard for connecting agents to external tools and data.
- SageMaker JumpStart
- A hub of pre-trained models that can be deployed and fine-tuned in SageMaker AI.
Practice problems
Work each problem on paper first, then reveal the answer to check.
Is content sent to Bedrock used to train the providers' base models?
Show answer
No; AWS states it is not used to improve base models or shared with providers.
Which Bedrock feature provides managed retrieval augmented generation?
Show answer
Knowledge Bases.
When would SageMaker AI suit better than Bedrock?
Show answer
When you need a model Bedrock does not offer or full control over training and hosting.
Lesson quiz · 5 questions
Score 60% or more to complete this lesson.
Create a free account to save your progress, take quizzes and earn a certificate.