Finance user
Can retrieve only documents tagged with finance.
- 2026 Budget Forecast
- Q3 Financial Report
A single Amazon Bedrock Knowledge Base can serve many departments only when ingestion, policy, retrieval, and session behavior are explicit. This document turns the architecture into readable, interactive system notes.
Layer 2 converts Cedar policy decisions into a metadata filter before vector search.
Select a role to see which documents enter retrieval. Executive access is policy-granted; finance and engineering stay bounded to their own metadata labels.
Can retrieve only documents tagged with finance.
Can retrieve only documents tagged with engineering.
Can retrieve multiple departments when Cedar permits cross-boundary access.
The important behavior is sequencing: upload event, sidecar creation, sidecar check, then indexing. Click any node to update the detail drawer.
Workflow cards reflow on smaller screens; tap a node to inspect its role.
The scheduled ingestion step verifies sidecar presence before starting the Bedrock job.
{ "metadataAttributes": {
"department": "engineering"
} }
Restrict writes to the tagging Lambda role and alarm on unexpected mutation.
Documents enter S3 under a department prefix. Upload permissions should match the principal department tag.
The first check gates the API. The second check builds the department filter that constrains the vector search and the model context.
If no group has a query permit, the authorizer returns 403 before the app logic runs.
Allowed departments become an explicit metadata filter applied before vector search.
{ "equals": {
"key": "department",
"value": "finance"
} }
Verified Permissions outages or empty permit sets deny access rather than widening the result set.
The request carries a bearer token whose group claims become policy inputs.
The application keeps a stable retrieval implementation. Access changes happen in the Verified Permissions policy store and are evaluated on request.
query dept-a KB
invoke Claude Haiku
query dept-b KB
invoke Claude Haiku
query dept-a/b/c KB
invoke Nova Lite
Policy edits live outside Lambda code, can be promoted through CI/CD, and are visible in CloudTrail.
The pattern is secure because it fails closed. That means alarms, latency tracking, and policy testing are part of the architecture, not afterthoughts.
| Signal | Why it matters |
|---|---|
| Layer 1 deny | credential probing or policy error |
| Layer 2 deny | unexpected document access miss |
| AVP latency | throttling or downstream pressure |
| SQS DLQ | failed metadata tagging |
Upload under department prefixes.
Run allow and deny scenarios.
Validate JWT and authorizer behavior.
Verify metadata filters.
Watch denies, latency, and DLQ signals.
curl -X POST https://api.example/prod/query
-H "Authorization: Bearer <id_token>" -d '{"query":"..."}'