AWS Bedrock & AI Services
This domain accounts for 22% of the ai-intermediate exam — the single largest domain. It tests your ability to architect, configure, and troubleshoot AI applications built on Amazon Bedrock and AWS's managed AI services. Expect scenario-based questions requiring you to choose between foundation models, configure Knowledge Bases or Agents, apply Guardrails, select the right AWS AI service for a task, and reason about pricing and security trade-offs. Memorizing exact API names, component relationships, and service boundaries is essential.
Amazon Bedrock Overview: Foundation Models
Amazon Bedrock is a fully managed service that provides access to foundation models (FMs) from multiple providers via a single API, without requiring you to manage infrastructure or train models from scratch.
Model Providers and Use Cases
| Provider | Model Family | Primary Use Cases |
|---|---|---|
| Anthropic | Claude (Haiku, Sonnet, Opus) | Chat, summarization, code generation, analysis |
| Amazon | Titan (Text, Embeddings, Image) | Text generation, embeddings for RAG, image generation |
| Meta | Llama 2, Llama 3 | Open-weight chat and code tasks |
| Mistral AI | Mistral, Mixtral | Efficient text generation, instruction following |
| Stability AI | Stable Diffusion | Image generation and editing |
| Cohere | Command, Embed | Text generation, embeddings |
| AI21 Labs | Jurassic | Long-form text generation |
Key Concepts
- Model access must be explicitly requested per AWS account; not all models are available in all regions.
- Cross-region inference allows routing requests to models in other regions when the home region is at capacity (covered separately below).
- Bedrock is serverless — no EC2 instances, no model weights to manage.
- Titan Embeddings is the primary model for generating vector embeddings within Knowledge Bases.
Common traps:
- Confusing "requesting model access" with "deploying" a model — there is no deployment step.
- Assuming all Claude versions are always available in every region — regional availability varies.
- Selecting SageMaker when the question asks for managed FM access without custom training.
Bedrock API: InvokeModel, Converse API, Streaming, Cross-Region Inference
Core API Methods
| API | Purpose | Notes |
|---|---|---|
| InvokeModel | Single synchronous call to one FM | Model-specific request/response body (JSON varies by provider) |
| InvokeModelWithResponseStream | Streaming tokens as they generate | Reduces perceived latency; uses Server-Sent Events |
| Converse | Unified chat interface across all models | Standardized message format; no per-model JSON differences |
| ConverseStream | Streaming version of Converse | Best choice for chat UIs requiring real-time output |
| InvokeAgent | Invoke a Bedrock Agent | Used with Agents for Bedrock, not raw FM calls |
InvokeModel vs Converse — Critical Distinction
- InvokeModel requires you to format the request body differently for each model family (e.g., Claude uses
anthropic_version, Titan usesinputText). You must handle schema differences in your application. - Converse abstracts these differences. The same code works across Claude, Titan, Llama, and Mistral. Prefer Converse for new multi-model applications.
Streaming
- Streaming is invoked via
InvokeModelWithResponseStreamorConverseStream. - The response is a stream of chunk events, not a single JSON blob.
- Use streaming when: end-user is waiting in real time, responses are long, or latency matters.
Cross-Region Inference
- Cross-region inference profiles allow Bedrock to automatically route requests to the same FM hosted in a secondary region when the primary region has insufficient capacity.
- You reference a system-defined inference profile (e.g.,
us.anthropic.claude-3-sonnet-20240229-v1:0) instead of a model ID. - The prefix
us.oreu.denotes the inference profile geography. - Data residency — data may leave your primary region; evaluate compliance requirements before enabling.
Common traps:
- Using
InvokeModelwith a hardcoded Claude request body and then claiming the code is model-agnostic — it is not. - Believing cross-region inference requires you to configure separate API endpoints — it does not; the profile ID handles routing transparently.
- Confusing
ConverseStream(chat streaming) withInvokeModelWithResponseStream(raw model streaming) — both stream, but Converse is model-agnostic.
Unlock with a paid plan
11 more sections (about 2,644 words) continue below. Every paid plan unlocks all AI Intermediate study guides, the full question bank and mock exams, from $4.97/month.