Amazon Bedrock architecture consists of a client application that sends prompts through an API layer to the Bedrock service, which processes the request using selected foundation models, optionally enriches it using knowledge bases (RAG), applies guardrails, and returns the generated response back to the user.
1. User / Application Layer
This is where interaction starts:
- Web app (chatbot UI)
- Mobile app
- Backend service
User sends:
- Prompt (e.g., “Explain AI”)
- Query (e.g., search in documents)
Handles request input:
- UI collects input
- Sends request via API
Common AWS tools used:
- API Gateway
- SDK (Python, Java, JS)
This layer prepares the request before sending to Bedrock:
Tasks:
- Format prompt
- Add system instructions
- Manage session memory
- Call Bedrock API
Example:
User: "Summarize this document"
Backend adds:
"You are a helpful assistant..."
Amazon Bedrock Core Layer 🧠
This is the main engine.
You choose which model to use:
- Claude
- Titan
- Llama
etc.
Same API → different models
Bedrock processes:
- Input prompt
- Context (chat history)
- Retrieved documents (if RAG)
Actual AI models generate output:
Types:
- Text models (chat, code)
- Image models
- Embedding models
Agents can:
- Call APIs
- Query databases
- Perform tasks
Example:
User: Book a ticket
Agent → calls booking API → returns result
Controls:
- Content filtering
- Data privacy
- Access control
Ensures:
- Safe responses
- No harmful output
If enabled, Bedrock uses:
- Vector database
- Embeddings
Flow:
User question → Search documents → Retrieve relevant info → Send to model
Connected data sources:
- S3 (PDFs, docs)
- Databases
- APIs
6. Data Sources Layer
Where actual data is stored:
- Files (PDF, Word)
- Company databases
- External APIs
Model generates:
- Text answer
- Image
- Structured output
Final output goes back through:
Bedrock → Backend → Frontend → User
User Input
↓
Frontend UI
↓
Backend (adds context)
↓
Bedrock API
↓
Model + Knowledge Base
↓
Generated Response
↓
User
| Component | Purpose |
|---|---|
| Frontend | User interaction |
| Backend | Prompt processing |
| Bedrock | AI engine |
| Models | Generate output |
| Knowledge Base | Long-term memory |
| Agents | Automation |
| Guardrails | Safety |