AWS Builder Center
Designing a Personal Health Memory with AWS and Generative AI

Designing a Personal Health Memory with AWS and Generative AI

Explore how AWS services and Generative AI can transform fragmented medical documents into a secure, structured, and searchable personal health memory, using serverless architecture, RAG, event-driven processing, and strong security controls.

Healthcare data is often fragmented across laboratory reports, prescriptions, diagnostic images, medical notes, appointments, and multiple healthcare providers.
The problem is not always the absence of information.
The real problem is that health information is usually difficult to organize, retrieve, correlate, understand, and use when it actually matters.
This creates an interesting opportunity:
What if we could build a secure personal health memory using AWS and Generative AI?
Instead of creating another application that simply stores medical files, we could build a platform capable of transforming unstructured medical information into a structured, chronological, searchable, and AI-assisted health history.
The objective would not be autonomous diagnosis.
The objective would be to help users better understand and navigate their own health information.
A user could eventually ask questions such as:
  • What medications have I taken during the last year?
  • What changed between my last three laboratory tests?
  • Which reports mention a specific condition?
  • When was a certain finding first mentioned?
  • What follow-up tests were recommended?
  • What appointments do I have coming up?
  • Can you summarize my recent medical history before my next consultation?
AWS provides many of the building blocks needed to create this type of architecture.

The Core Idea: A Personal Health Memory

The key concept is not the chatbot.
The chatbot is only one possible interface.
The real value comes from building a reliable data layer underneath it.
Conceptually:
Medical Documents
+
Structured Health Data
+
Health Events
+
Appointments
+
Medications
+
Historical Records
↓
Personal Health Memory
↓
Retrieval Layer
↓
Generative AI
↓
Contextual User Experience
Without this foundation, an AI assistant can only answer generic health questions.
With it, the system can begin answering questions based on the user's actual medical history.
For example:
What happened?
When did it happen?
Which document supports it?
How has it changed over time?
What information is still pending?
What is relevant for the next appointment?



2. High-Level AWS Architecture

A simplified version of the architecture could look like this:
Web / Mobile Application
│
▼
Amazon Cognito
│
▼
Amazon API Gateway
│
▼
AWS Lambda
│
┌─────────────────┼──────────────────┐
│ │ │
▼ ▼ ▼
Amazon DynamoDB Amazon S3 Amazon Bedrock
Structured Health Documents Generative AI
Data │
▼
Amazon Textract
│
▼
Processing Workflow
│
▼
Search / Retrieval / RAG
A more mature architecture could also include:
  • Amazon SQS
  • Amazon EventBridge
  • AWS Step Functions
  • AWS KMS
  • AWS CloudTrail
  • Amazon CloudWatch
  • AWS Secrets Manager
  • AWS WAF
  • Infrastructure as Code with AWS CDK
The architecture can start small and evolve as the application grows.



3. Identity and Authentication with Amazon Cognito

Any health-related application must begin with strong identity controls.
Amazon Cognito could provide:
  • User registration
  • Authentication
  • Password recovery
  • Multi-factor authentication
  • JWT-based access
  • Identity federation
  • Integration with API Gateway
After authentication, the application receives tokens that can be used to authorize API requests.
A critical design principle is:
Never trust a user ID sent by the frontend.
Instead, backend services should derive the authenticated identity from the validated token.
For example, instead of trusting:
{
"userId": "123",
"documentId": "abc"
}
the backend should determine the user identity from Cognito claims.
This helps prevent one user from attempting to access another user's documents simply by modifying identifiers in requests.
Authentication answers:
Who are you?
Authorization must answer:
Are you allowed to access this specific health resource?
Both are required.



4. Uploading Medical Documents

Users may want to upload:
  • Laboratory results
  • Prescriptions
  • Imaging reports
  • Medical reports
  • Discharge summaries
  • Procedure reports
  • Referral orders
  • Historical medical records
A good upload flow could avoid sending large documents through Lambda.
Instead:
Frontend
│
│ Request upload URL
▼
API Gateway
│
▼
Lambda
│
│ Generate pre-signed URL
▼
Frontend
│
│ Upload directly
▼
Amazon S3
The backend generates a short-lived S3 pre-signed URL.
The browser then uploads the document directly to Amazon S3.
This reduces unnecessary backend processing and allows the architecture to scale more efficiently.



5. Amazon S3 as the Original Evidence Repository

Amazon S3 could store the original health documents.
For example:
health-records/
profile-001/
2026/
laboratory/
document-001.pdf
imaging/
document-002.pdf
prescriptions/
document-003.pdf
However, the S3 path itself should never be considered an authorization mechanism.
Access should always be validated at the application level.
Useful S3 controls could include:
  • Block Public Access
  • Server-side encryption
  • Versioning
  • Restrictive bucket policies
  • Lifecycle policies
  • Logging
  • Object tagging
The original document should ideally remain immutable after upload.
This creates an important distinction:
AI-generated interpretations can change. Original medical evidence should remain preserved.



6. Event-Driven Processing

Medical document analysis should generally happen asynchronously.
A user should not have to wait during a single HTTP request while the system performs OCR, classification, extraction, summarization, embedding generation, and indexing.
A better architecture would be event-driven.
User uploads document
│
▼
Amazon S3
│
▼
Object Created Event
│
▼
Amazon EventBridge
│
▼
Amazon SQS
│
▼
Processing Workflow
Amazon SQS provides decoupling between document upload and processing.
If many documents arrive simultaneously, workers can process them independently.
This architecture is more resilient and easier to scale.



7. Workflow Orchestration with AWS Step Functions

Document processing is usually a multi-step workflow.
Instead of creating one large Lambda function, AWS Step Functions could coordinate the pipeline.
Example:
Validate Document
↓
Detect File Type
↓
Extract Text
↓
Classify Document
↓
Extract Health Information
↓
Normalize Data
↓
Generate Summary
↓
Generate Embeddings
↓
Persist Results
↓
Mark Document READY
The document could move through states such as:
UPLOADED
VALIDATING
EXTRACTING
ANALYZING
INDEXING
READY
FAILED
The frontend could display the current state.
For example:
Laboratory Report.pdf

Status:
Analyzing medical information...
Step Functions also improves error handling, retries, observability, and workflow visibility.



8. Extracting Medical Information with Amazon Textract

Many healthcare documents still exist primarily as PDFs or scanned images.
Amazon Textract can help extract:
  • Text
  • Tables
  • Forms
  • Key-value pairs
Consider this laboratory report:
TEST RESULT UNIT REFERENCE

Hemoglobin 14.2 g/dL 13.5 - 17.5
Glucose 91 mg/dL 70 - 99
Creatinine 0.92 mg/dL 0.70 - 1.30
Textract can provide the raw content.
But extracting text is not enough.
The application must transform it into structured health information.



9. Transforming Documents into Structured Data

After OCR, a model available through Amazon Bedrock could transform extracted content into a normalized representation.
For example:
{
"documentType": "LABORATORY_REPORT",
"date": "2026-08-20",
"results": [
{
"test": "Hemoglobin",
"value": 14.2,
"unit": "g/dL",
"referenceMin": 13.5,
"referenceMax": 17.5
},
{
"test": "Glucose",
"value": 91,
"unit": "mg/dL",
"referenceMin": 70,
"referenceMax": 99
}
]
}
This transformation is fundamental.
A PDF is useful to a human.
Structured information is useful to humans, applications, analytics systems, and AI workflows.
Once information becomes structured, the platform can create longitudinal views.



10. Building a Longitudinal Health Timeline

Suppose the user uploads laboratory reports from multiple years.
The system could transform independent documents into a timeline.
For example:
Creatinine

2024-02-14 0.81 mg/dL
2024-09-10 0.86 mg/dL
2025-03-21 0.88 mg/dL
2025-11-08 0.90 mg/dL
2026-08-20 0.92 mg/dL
Now the application can answer:
How has this value changed during the last two years?
This is significantly more useful than asking an LLM to summarize one PDF at a time.
The platform starts to build an actual health memory.



11. DynamoDB for Operational Health Data

Amazon DynamoDB could store structured health information.
Possible entities might include:
USER
PROFILE
DOCUMENT
MEDICAL_EVENT
LAB_RESULT
MEDICATION
APPOINTMENT
PROCEDURE
PROVIDER
REMINDER
AI_SUMMARY
An example key model might look like:
PK SK

PROFILE#123 METADATA
PROFILE#123 DOC#2026-08-20#001
PROFILE#123 LAB#2026-08-20#GLUCOSE
PROFILE#123 LAB#2026-08-20#CREATININE
PROFILE#123 MED#2026-07-01#001
PROFILE#123 APPT#2026-09-15#001
This allows access patterns such as:
Get health timeline
Get laboratory results
Get active medications
Get upcoming appointments
Get documents by date
Get records associated with a medical event
DynamoDB modeling should be designed around application access patterns rather than trying to reproduce relational tables.



12. Generative AI with Amazon Bedrock

Amazon Bedrock could provide the Generative AI layer.
Possible capabilities include:
  • Summarizing long medical reports
  • Explaining complex terminology
  • Extracting structured entities
  • Creating chronological summaries
  • Comparing multiple records
  • Preparing medical appointment summaries
  • Generating questions the user may want to discuss with a healthcare professional
However, a critical design principle is separating:
Information organization
from
Medical diagnosis
For example, instead of generating:
"You have condition X."
the system should prefer something closer to:
"This report mentions finding X.

The clinical significance of this finding should be discussed
with a qualified healthcare professional."
The AI should support decision-making, not silently replace professional medical judgment.



13. Retrieval-Augmented Generation

A traditional chatbot architecture looks like:
Question
↓
LLM
↓
Answer
That is not enough for a personal health platform.
The model should answer using the user's actual records.
A better architecture is:
User Question
↓
Query Understanding
↓
Retrieve Relevant Health Information
↓
Build Context
↓
Amazon Bedrock
↓
Grounded Response
↓
Source References
This is Retrieval-Augmented Generation, or RAG.
The model receives only relevant context rather than the user's entire health history.



14. Example of a Grounded Health Query

Suppose a user asks:
What changed in my last three blood tests?
The application should not immediately send that question to a model.
First, the system could interpret the request:
Intent:
COMPARE_LAB_RESULTS

Time range:
LATEST_3

Data source:
STRUCTURED_HEALTH_DATA
Then DynamoDB could retrieve the relevant records.
For example:
{
"results": [
{
"date": "2026-08-20",
"glucose": 91,
"creatinine": 0.92
},
{
"date": "2026-05-14",
"glucose": 95,
"creatinine": 0.88
},
{
"date": "2026-01-10",
"glucose": 89,
"creatinine": 0.86
}
]
}
Only that information would be included in the context sent to the model.
The prompt could conceptually include:
SYSTEM:

Use only the supplied health records.

Do not invent medical facts.

Do not diagnose.

Clearly distinguish extracted information
from AI-generated explanation.

If information is unavailable, say so.

QUESTION:

What changed in my last three blood tests?

CONTEXT:

[Relevant health records]
This improves grounding and reduces the probability of unsupported answers.



15. Hybrid Retrieval

Not every health question should use vector search.
This distinction is important.
Consider:
What was my glucose result on August 20?
This is a structured database query.
Now consider:
What did my doctor say about inflammation?
That information may be hidden inside an unstructured medical report.
Semantic retrieval may work better.
Therefore, a hybrid architecture could look like:
User Question
│
▼
Intent Router
│
┌─────────────┼─────────────┐
│ │ │
▼ ▼ ▼
Structured Semantic Combined
Search Retrieval Retrieval
│ │ │
▼ ▼ ▼
DynamoDB Vector Store Both
│ │ │
└─────────────┼─────────────┘
▼
Context Builder
│
▼
Amazon Bedrock
This architecture lets each question use the most appropriate retrieval method.



16. Knowledge Bases for Amazon Bedrock

Knowledge Bases for Amazon Bedrock could support semantic retrieval.
Documents could be:
Extracted
↓
Chunked
↓
Converted into embeddings
↓
Indexed
↓
Retrieved semantically
Imagine a user with hundreds of medical documents.
A question like:
Which reports mention kidney stones?
should not require sending every document to the foundation model.
The retrieval system should identify only the most relevant sections.
For example:
CT Report - Page 2
Emergency Report - Page 1
Urology Consultation - Page 3
These passages become the context for generation.
This reduces unnecessary token usage and improves answer relevance.



17. Traceability and Citations

For a health assistant, source traceability should be a core requirement.
An AI-generated answer should be connected to its underlying evidence.
For example:
Your records mention this finding in:

1. CT Report — August 12
2. Urology Consultation — August 15
The user could select the citation and open the original document.
Conceptually:
AI Answer
↓
Extracted Fact
↓
Document Reference
↓
Original Evidence
This improves transparency and user trust.



18. AI Must Know When Information Is Missing

A health assistant should not feel obligated to answer every question.
If the requested information cannot be found, the system should say so.
Instead of inventing:
Your physician recommended...
the platform should respond:
I couldn't find this recommendation in the medical
records currently available in your account.
The architecture should support this explicitly.
Retrieve Context
↓
Enough evidence?
/ \
YES NO
↓ ↓
Generate Return
answer "Not found"
Knowing when not to answer is an important AI capability.



19. Amazon Bedrock Guardrails

Amazon Bedrock Guardrails could provide another layer of protection around AI interactions.
Depending on product requirements, guardrails could help control:
  • Unsafe generated content
  • Sensitive information handling
  • Topic boundaries
  • Certain undesired model behaviors
  • Response filtering
However, guardrails should never replace application-level controls.
A layered model is stronger:
Authentication
+
Authorization
+
Data isolation
+
Prompt design
+
Retrieval restrictions
+
Guardrails
+
Output validation
+
Audit logging



20. Medication History

Structured medical data enables additional capabilities.
The platform could maintain a medication history.
Medication
│
├── Name
├── Dosage
├── Frequency
├── Start date
├── End date
├── Prescribing physician
├── Related medical event
└── Source document
Users could ask:
Which medications was I taking in March?
or:
When was medication X first prescribed?
This information could come from structured data rather than requiring semantic search every time.



21. Follow-Up Detection and Reminders

Medical reports often include phrases such as:
Follow-up in three months.

Repeat examination in six weeks.

Schedule specialist evaluation.
The processing pipeline could detect these recommendations.
For example:
Medical Report
↓
Textract
↓
Bedrock
↓
Follow-up Detected
↓
User Confirmation
↓
Create Reminder
The user confirmation step is important.
The AI should propose an action rather than silently creating medical instructions.



22. EventBridge Scheduler for Reminders

After the user confirms a follow-up, Amazon EventBridge Scheduler could trigger a future workflow.
Reminder
↓
EventBridge Scheduler
↓
Lambda
↓
Notification
↓
User
Notifications could later be delivered through email, push notifications, or other supported channels.
Examples might include:
  • Upcoming appointments
  • Medication reminders
  • Recommended follow-up dates
  • Pending laboratory tests



23. Preparing for Medical Appointments

One valuable future feature would be automatic appointment preparation.
Imagine that the user has a specialist appointment tomorrow.
The application could retrieve:
  • Relevant recent laboratory results
  • Previous consultations with the same specialty
  • Current medications
  • Recent procedures
  • Previous recommendations
  • Pending examinations
Generative AI could then prepare:
Appointment Preparation

Relevant recent records:
- Laboratory report
- Specialist consultation
- Imaging report

Current medications:
- ...

Previous recommendations:
- ...

Pending follow-ups:
- ...

Questions you may want to discuss:
1. ...
2. ...
3. ...
Again, the goal is information organization rather than autonomous medical decision-making.



24. Portable Health Summary

The platform could eventually generate a concise health summary.
For example:
PERSONAL HEALTH SUMMARY

Relevant History
----------------
...

Current Medications
-------------------
...

Previous Procedures
-------------------
...

Recent Laboratory Results
-------------------------
...

Allergies
---------
...

Pending Follow-ups
------------------
...
This could help users prepare information before visiting a new healthcare provider.
Every section should ideally remain linked to its original records.



25. Healthcare Interoperability

As the platform grows, healthcare interoperability becomes increasingly important.
FHIR provides standardized representations for healthcare data.
Concepts could eventually map to resources such as:
Patient
Observation
Medication
Condition
Procedure
DiagnosticReport
Appointment
Practitioner
This becomes especially relevant when integrating with external providers, laboratories, clinics, insurers, or hospital systems.



26. AWS HealthLake as a Future Option

For more advanced healthcare workloads, Amazon HealthLake could be evaluated.
It may become relevant when the platform needs more extensive support for FHIR-based health information.
However, specialized healthcare infrastructure may not be necessary for an early MVP.
An initial implementation could remain simpler:
Amazon S3
Amazon DynamoDB
AWS Lambda
Amazon API Gateway
Amazon Cognito
Amazon Textract
Amazon Bedrock
Additional specialized services could be introduced as requirements become clearer.
Architecture should evolve with product needs rather than adding complexity prematurely.



27. Data Minimization

Privacy should influence the retrieval architecture.
If a user asks:
Summarize my latest laboratory test.
there may be no reason to provide unrelated medical history to the foundation model.
A useful principle is:
Question
↓
Determine necessary context
↓
Retrieve minimum required information
↓
Amazon Bedrock
This improves privacy, performance, and AI cost efficiency.



28. Encryption and Key Management

Health data should be encrypted both in transit and at rest.
Communication should use TLS.
Data stores could use encryption for:
Amazon S3
Amazon DynamoDB
Logs
Backups
Queues
AWS KMS could provide centralized key management.
Depending on security requirements, customer-managed keys could provide more granular control over encryption policies.



29. Secrets Management

Sensitive credentials should never be hardcoded.
AWS Secrets Manager or AWS Systems Manager Parameter Store could manage:
  • External API credentials
  • Database secrets
  • Signing keys
  • Integration tokens
  • Environment-specific secrets
This also simplifies credential rotation.



30. Auditability

Healthcare applications need strong audit capabilities.
Potential application events include:
User authenticated
Document uploaded
Document viewed
Document deleted
AI summary generated
Health record modified
Permission changed
AWS CloudTrail can provide auditing of AWS API activity.
Application-level events should also be captured separately.
It is useful to differentiate:
Infrastructure audit logs
Application audit logs
Security events
AI interaction logs
Each provides a different type of evidence.



31. AI Observability

An AI-based system requires metrics beyond traditional backend monitoring.
Useful metrics might include:
  • Model latency
  • Retrieval latency
  • Token consumption
  • Documents retrieved per query
  • Answers containing citations
  • OCR failures
  • Extraction validation failures
  • Guardrail interventions
  • No-context responses
  • Failed document workflows
Amazon CloudWatch could monitor infrastructure and application metrics.
Tracing can also help follow requests across services.
For example:
API Gateway
↓
Lambda
↓
Retrieval
↓
DynamoDB
↓
Bedrock



32. AI Evaluation as Part of Testing

Generative AI should also be tested systematically.
A test dataset could contain questions such as:
Question:

"What was my glucose result on August 20?"

Expected source:

LAB-2026-08-20

Expected answer:

91 mg/dL
The evaluation pipeline could validate:
  • Was the correct record retrieved?
  • Was the correct value returned?
  • Was the correct source cited?
  • Did the AI introduce unsupported information?
  • Did it refuse correctly when information was unavailable?
This transforms AI quality into something measurable.



33. Protecting Against Prompt Injection

RAG introduces a new security issue.
Uploaded documents are untrusted input.
A malicious document might contain text like:
Ignore previous instructions...
A naive implementation could accidentally treat that content as instructions.
Retrieved document content should always be treated as data.
Possible controls include:
  • Prompt separation
  • Content validation
  • Retrieval filtering
  • Restricted AI permissions
  • Output validation
  • Guardrails
  • Least-privilege tools
This becomes especially important if agents are introduced.



34. AI Agents and Multi-Step Workflows

A future version could use agents for more complex requests.
For example:
Prepare everything relevant for my appointment tomorrow.
The workflow could involve:
1. Find tomorrow's appointment
2. Identify the specialty
3. Retrieve relevant medical history
4. Retrieve recent examinations
5. Retrieve current medications
6. Identify pending follow-ups
7. Generate an appointment summary
Amazon Bedrock Agents could potentially support some multi-step interactions.
However, actions should be divided into:
READ ACTIONS

and

WRITE ACTIONS
Read-only actions could be more automated.
Actions such as:
  • Sharing health records
  • Cancelling appointments
  • Updating important information
  • Sending records externally
should require explicit confirmation.



35. Human-in-the-Loop Design

A useful design principle is:
AI proposes. Humans confirm important actions.
For example:
AI detects:

"Repeat examination in 3 months."

↓

Application asks:

"Would you like to create a reminder?"

/ \
YES NO
↓
Create reminder
This model combines automation with user control.



36. Family Health Profiles

A future application could support family or dependent profiles.
For example:
Account
│
├── Personal Profile
├── Child Profile
├── Parent Profile
└── Dependent Profile
This introduces more complex authorization requirements.
Roles might include:
OWNER
CAREGIVER
READ_ONLY
DEPENDENT
TEMPORARY_ACCESS
Medical records should belong to a health profile rather than simply to a login account.
The authorization system would determine who can access each profile.



37. Infrastructure as Code

The architecture should ideally be reproducible.
AWS CDK could define infrastructure such as:
Cognito
API Gateway
Lambda
DynamoDB
S3
SQS
Step Functions
EventBridge
IAM
CloudWatch
KMS
This provides several advantages:
  • Repeatable environments
  • Version-controlled infrastructure
  • Easier reviews
  • Consistent deployments
  • Reduced manual configuration
Environments could be separated into:
DEV
STAGING
PRODUCTION
Production medical data should not be casually copied into development environments.
Synthetic datasets are preferable for testing.



38. CI/CD and Quality Engineering

A deployment pipeline could include:
Developer
↓
Pull Request
↓
Unit Tests
↓
API Tests
↓
Security Checks
↓
Infrastructure Validation
↓
AI Evaluation
↓
Deploy DEV
↓
Integration Tests
↓
STAGING
↓
Approval
↓
PRODUCTION
An AI-enabled health platform introduces additional testing requirements:
Functional testing
API testing
Authorization testing
Security testing
RAG retrieval testing
Prompt injection testing
Hallucination evaluation
Citation validation
Model regression testing
Traditional software quality practices remain essential, but AI adds new dimensions.



39. Failure Handling

Medical documents will not always process successfully.
Failures may include:
  • Corrupted PDFs
  • Unsupported formats
  • Poor-quality scans
  • OCR failures
  • Unknown document structures
  • Bedrock timeouts
  • Invalid structured output
  • Duplicate uploads
  • Missing dates
  • Unexpected laboratory formats
The workflow should explicitly handle failures.
For example:
Processing Error
↓
Retry?
/ \
YES NO
↓ ↓
Retry DLQ
↓
Operational Alert
The user should receive a meaningful message instead of a generic error.
For example:
We couldn't automatically process this document.

The original file is still securely stored and can be
reviewed or processed again.



40. Idempotency

Event-driven applications must also protect against duplicate processing.
The same event may occasionally be delivered more than once.
A useful idempotency identifier could be:
documentId + processingVersion
Before generating records, the system verifies whether that processing operation already completed.
This prevents duplicate medical events and duplicated AI processing.



41. Cost-Aware Architecture

Serverless AWS services can be attractive for early-stage applications because costs are largely aligned with usage.
For example:
API Gateway → Requests
Lambda → Executions
S3 → Storage and requests
DynamoDB → Read/write usage
Textract → Document processing
Bedrock → Model usage
AI requires additional cost controls.
Useful metrics include:
  • Tokens per request
  • Number of retrieved chunks
  • Model selected
  • Repeated summarization
  • Embedding generation
  • Document processing frequency
An important optimization is avoiding unnecessary repeated AI calls.
If an immutable document has already been:
Classified
Extracted
Summarized
Embedded
those results can be stored.
Opening the same document tomorrow should not necessarily trigger the entire pipeline again.



42. Model Routing

Not every AI task needs the largest or most capable model.
A future architecture could route tasks differently.
For example:
Document classification
↓
Smaller model

Structured extraction
↓
Cost-efficient model

Complex longitudinal summary
↓
More capable model

Appointment preparation
↓
More capable model
Model routing can reduce cost while preserving quality where it matters most.



43. MVP Architecture

The first version does not need every component described above.
A reasonable MVP could be:
User
↓
Web Application
↓
Amazon Cognito
↓
Amazon API Gateway
↓
AWS Lambda
├──────────────→ Amazon DynamoDB
│
└──────────────→ Amazon S3
↓
Amazon Textract
↓
Amazon Bedrock
The initial capabilities could include:
  1. Authentication
  1. Upload medical documents
  1. Extract document text
  1. Identify document type
  1. Extract structured health information
  1. Generate summaries
  1. Build a basic health timeline
  1. Ask questions about uploaded records
  1. Display source references
  1. Manage basic appointments and reminders
That alone could provide meaningful value.



44. Future Evolution

After validating the MVP, the architecture could expand toward:
MVP
↓
Advanced RAG
↓
Longitudinal Health Analysis
↓
Family Profiles
↓
Healthcare Provider Integration
↓
FHIR Interoperability
↓
Advanced AI Agents
Potential future capabilities include:
  • Advanced laboratory trends
  • Family health management
  • Provider directories
  • Healthcare network information
  • Insurance integration
  • Intelligent follow-up detection
  • Appointment preparation
  • Portable health summaries
  • External healthcare integrations
  • FHIR-compatible data exchange



45. A More Complete Architecture

A mature version could eventually look like:
USERS
│
┌───────┴───────┐
│ │
Web Mobile
│ │
└───────┬───────┘
│
▼
Amazon Cognito
│
▼
Amazon API Gateway
│
▼
AWS Lambda
│
┌────────────────┼─────────────────┐
│ │ │
▼ ▼ ▼
DynamoDB S3 EventBridge
│ │
▼ ▼
Textract SQS
│
▼
Step Functions
│
┌─────────────────┼──────────────┐
│ │ │
▼ ▼ ▼
Textract Bedrock Validation
│ │
└────────┬────────┘
│
▼
Structured Data
│
┌───────────┴───────────┐
│ │
▼ ▼
DynamoDB RAG Layer
│ │
└───────────┬───────────┘
▼
AI Assistant
│
▼
Guardrails
│
▼
Grounded Response
│
▼
Source Citations
Supporting services could include:
AWS KMS
AWS CloudTrail
Amazon CloudWatch
AWS Secrets Manager
AWS WAF
AWS CDK



Conclusion

Generative AI has enormous potential in healthcare, but some of the most valuable applications may not come from asking models to make increasingly complex medical decisions.
A major opportunity exists in something more fundamental:
Helping people organize, understand, retrieve, and use the health information they already have.
AWS provides many of the building blocks needed to build this type of platform:
  • Amazon S3 for medical documents
  • Amazon Textract for document extraction
  • Amazon Bedrock for Generative AI
  • Knowledge Bases for Amazon Bedrock for RAG
  • Amazon DynamoDB for structured information
  • AWS Lambda for serverless processing
  • Amazon API Gateway for APIs
  • Amazon Cognito for authentication
  • AWS Step Functions for orchestration
  • Amazon EventBridge for event-driven workflows
  • Amazon SQS for asynchronous processing
  • AWS KMS for key management
  • AWS CloudTrail for auditing
  • Amazon CloudWatch for observability
  • AWS CDK for Infrastructure as Code
The difficult part is not simply connecting these AWS services.
The real engineering challenge is designing a platform where:
Security
Privacy
Data quality
Traceability
AI grounding
Reliability
Cost
User experience
all work together.
And perhaps the most important design principle is:
AI should not replace the medical record or the healthcare professional. It should make personal health information easier to understand and use.
For me, that is where the combination of cloud computing, event-driven architecture, structured data, and Generative AI becomes especially interesting.
What would you change in this architecture?
Would you start with S3 and DynamoDB and introduce FHIR later, or would you design the health data layer around FHIR from day one?
And for the AI layer, would you prefer hybrid structured-data + RAG retrieval, or centralize everything around a single knowledge layer?
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article