← Back to Dashboard
1. What Is Amazon Bedrock?2. Core Services and Request Flow
Core Services and Request Flow
📚 Bedrock Foundations⏱ 10 min⭐ 60 XP
How a Bedrock Request Moves Through AWS
A typical Bedrock app has five layers: application UI/API, orchestration logic, model invocation, safety checks, and telemetry. Understanding this flow is the difference between a demo and a production system.
- Ingress - user input reaches your backend (Lambda, ECS/Fargate, EC2, or App Runner) through API Gateway or an ALB.
- Orchestration - your code assembles the request: system prompt, conversation history, retrieved context, tool definitions.
- Invocation - the backend calls the Bedrock Runtime API (
ConverseorInvokeModel) with a model ID and messages. - Safety - Guardrails evaluate the prompt before the model sees it and the response before the user sees it.
- Telemetry - token usage, latency, stop reason, and guardrail verdicts flow to CloudWatch/CloudTrail and your tracing store.
Two APIs, Two Jobs
Bedrock splits its surface into a control plane and a data plane - the same pattern as most AWS services:
| Plane | Service endpoint | Example operations |
|---|---|---|
| Control plane | bedrock | ListFoundationModels, CreateGuardrail, CreateKnowledgeBase, model customization jobs |
| Data plane | bedrock-runtime | Converse, ConverseStream, InvokeModel, ApplyGuardrail |
This matters for IAM too: an application role usually needs only bedrock:InvokeModel-class data-plane actions, while a platform/admin role manages the control plane.
A Minimal Python Invocation
import boto3
client = boto3.client("bedrock-runtime", region_name="us-east-1")
response = client.converse(
modelId="amazon.nova-lite-v1:0",
messages=[{"role": "user", "content": [{"text": "Explain S3 lifecycle rules in 3 bullets"}]}],
inferenceConfig={"maxTokens": 512, "temperature": 0.2},
)
print(response["output"]["message"]["content"][0]["text"])
print(response["usage"]) # inputTokens / outputTokens -> cost telemetry
Design rule: make each of the five layers independently observable and auditable. When quality drops or costs spike, you need to know which layer changed - prompt, context, model version, guardrail policy, or traffic mix.
🧪 Knowledge Check
Press 1-4 to select1 of 4
Which API is used for model inference responses?
CloudFormation API
Bedrock Runtime API
Route 53 API
Athena API