Skip to content
SIRJAHIBENTLEY
All work
Planned ArchitectureDocument AI

SecureDocs AI

A planned AWS design for permission-aware document search and AI-assisted answers, with a traceable ingestion path and explicit data boundaries.

Planned reference architecture only; no deployment, customer relationship, security certification or compliance approval is claimed.

01 · Problem

Teams need useful answers from internal documents without losing sight of who may access each source, where content is processed or how an answer can be checked.

02 · Context

SecureDocs AI is a planned reference design, not a deployed system. The model, indexing approach and AWS services require validation against data classification, access controls, region, cost and legal requirements.

03 · Constraints

  • Preserve source permissions through indexing and retrieval; do not rely on the model to enforce access.
  • Return citations and allow the system to abstain when evidence is missing.
  • Keep document ingestion, extracted text, embeddings and prompts within an explicitly approved boundary.
  • Make retention, deletion and key management requirements part of the design.

04 · Architecture

UserAuthorized requestWeb applicationCloudFront · S3Amazon CognitoUser identityAPI + policyAPI Gateway · LambdaDocument intakeS3 · TextractSearch + AIOpenSearch · BedrockOperationsCloudWatch · KMS

05 · Alternatives considered

Keyword search

Straightforward and predictable, but less effective for questions phrased differently from the source text.

Managed knowledge-base workflow

Can reduce custom integration work; confirm its permission model, supported retrieval controls and operational fit.

Custom retrieval with OpenSearch

Offers more control over indexing and retrieval, with greater responsibility for evaluation and operations.

06 · Decision rationale

  • A separate ingestion path makes extraction, validation and re-indexing observable.
  • Authorization must be applied before retrieval so inaccessible sources never enter the model context.
  • Citations and evaluation help reviewers inspect whether answers are grounded in the right material.

07 · Trade-offs

  • Permission-aware indexing and deletion require careful synchronization with source systems.
  • OCR, embeddings, vector search and model inference each add cost and operational complexity.
  • Generative answers can still be incomplete or wrong and must not replace professional judgment.

08 · Security

  • Treat source documents, extracted text, embeddings, prompts and logs as potentially sensitive.
  • Use KMS-backed encryption and narrowly scoped service permissions, then verify the effective access path.
  • Set explicit retention and deletion behavior for source copies, indexes and observability data.

09 · Testing approach

  • Test tenant and document-level access with both permitted and denied identities.
  • Measure retrieval quality and citation accuracy on an approved, representative question set.
  • Verify deletion, key rotation, logging redaction and model abstention behavior.

10 · Implemented vs. planned

Planned

  • Permission-aware document ingestion and indexing
  • Citation-based retrieval with an explicit abstention path
  • Evaluation set, access-control tests and operational runbook
  • Data-flow and retention review before any production decision

11 · Next steps

  • Classify source data and establish the approved processing boundary.
  • Choose a representative corpus and define access-control test cases.
  • Compare managed and custom retrieval options against those requirements.

12 · Stack

Amazon S3Amazon TextractAmazon CognitoAmazon API GatewayAWS LambdaAmazon BedrockAmazon OpenSearch ServerlessAWS KMSAmazon CloudWatch

Next case study

ScaleCart