Healthcare AI

Building HIPAA-Compliant AI Pipelines on AWS

Published: February 2025
Read time: 6 min
Tags: HIPAA, AWS, Healthcare, Compliance

HIPAA compliance for AI systems is not a legal checklist you complete at the end of a project. It is an architecture decision that affects every component of your system — from how you store training data to how you log inference requests to how you handle model outputs that contain protected health information. Most healthcare AI projects treat compliance as a final step. They build the system, then ask their legal team to review it. By that point, the architectural decisions that determine whether the system is compliant or not have already been made and are expensive to reverse. This article covers what HIPAA actually requires technically for AI pipelines on AWS, where teams consistently get it wrong, and how to design compliance in from day one.

What HIPAA Actually Requires for AI Systems HIPAA's Security Rule establishes technical safeguards for systems that handle Protected Health Information. For AI pipelines, the relevant requirements are: access controls, audit controls, integrity controls, and transmission security. The critical distinction most teams miss: HIPAA applies to PHI wherever it exists in your system — in your training data, in your inference inputs, in your model outputs, in your logs, and in your monitoring dashboards. If a patient's name, diagnosis, or any of the 18 HIPAA identifiers appears anywhere in your AI pipeline, that component is in scope. This catches teams off guard when they realize their logging system — which they did not think of as a healthcare system — is storing PHI from inference requests and is therefore a HIPAA-covered component requiring full technical safeguards.

Business Associate Agreements on AWS AWS will sign a Business Associate Agreement covering specific HIPAA-eligible services. This does not mean all AWS services are HIPAA compliant — it means AWS accepts BAA liability for a defined list of services when you configure them correctly. HIPAA-eligible AWS services relevant to AI pipelines include: S3, EC2, RDS, Lambda, SageMaker, Bedrock, Comprehend Medical, Textract, and several others. Services NOT on the HIPAA-eligible list — including some CloudWatch configurations — cannot be used to process PHI. Before designing your architecture, download the current AWS HIPAA eligible services list and verify every service you plan to use is on it. This list changes as AWS adds services and is the first thing an auditor will ask for.

Encryption Requirements HIPAA requires encryption of PHI at rest and in transit. On AWS, this means: S3 buckets storing PHI must use SSE-KMS with customer-managed keys, RDS instances must have encryption enabled at creation — you cannot encrypt an existing unencrypted RDS instance without rebuilding it, SageMaker training jobs and endpoints must use KMS encryption for training data, model artifacts, and output, and all data in transit must use TLS 1.2 or higher — TLS 1.0 and 1.1 are not acceptable. The customer-managed KMS key requirement is important. AWS-managed keys give AWS visibility into your data. For HIPAA workloads, you want customer-managed keys where your organization controls key rotation, key policy, and key deletion.

Audit Logging — The Most Common Gap HIPAA's audit control requirement means you must record and examine activity in your AI system. In practice this means: every API call to your AI pipeline must be logged, every inference request must log who made it, when, and what data was submitted, and you must be able to produce these logs for any time period in response to an audit or breach investigation. On AWS, CloudTrail logs API calls at the infrastructure level. This is necessary but not sufficient. You also need application-level audit logging that captures: user identity, patient record accessed, query submitted to the AI system, and the AI system's response. This application audit log is what auditors actually want to see — CloudTrail alone will not satisfy an audit. Store audit logs in a separate S3 bucket with object lock enabled. Object lock prevents modification or deletion of logs for a defined retention period. HIPAA requires audit log retention for a minimum of 6 years. Without object lock, logs can be deleted — accidentally or maliciously — and you have no way to prove they were not tampered with.

Access Controls and Minimum Necessary HIPAA's minimum necessary standard requires that access to PHI is restricted to what is required for a specific function. In AI systems this creates a design challenge: AI models often perform better with more data, but HIPAA requires you to use the minimum PHI necessary. Implement role-based access control at every layer: who can submit queries to the AI system, which patient records can each role access, and which model outputs can be returned to which users. Do not rely on application-layer access controls alone — enforce them at the data layer using RDS row-level security or S3 bucket policies that restrict access by IAM role. For SageMaker endpoints, use VPC endpoint policies to ensure the endpoint is only accessible from within your private VPC. Public endpoints for healthcare AI are not acceptable regardless of other controls.

De-identification for Training Data If you are training or fine-tuning models on patient data, de-identification is the safest path to reducing HIPAA scope. HIPAA defines two de-identification methods: Expert Determination and Safe Harbor. Safe Harbor requires removing all 18 specified identifiers. Expert Determination requires a qualified expert to certify that re-identification risk is very small. AWS Comprehend Medical can detect and redact PHI from clinical text. It is not perfect — accuracy on unusual name formats or non-standard clinical abbreviations is lower — so human review of de-identified training data is important before using it for model training. De-identified data is no longer PHI and falls outside HIPAA scope, which significantly simplifies your compliance posture for the training pipeline.

Incident Response Requirements HIPAA requires a documented incident response plan and breach notification procedures. For AI systems this includes: procedures for detecting when PHI was exposed through an AI inference response, the 60-day notification requirement for breaches affecting 500 or more individuals, and documentation of the investigation and remediation steps taken. Build breach detection into your monitoring. Anomaly detection on inference request volumes, unusual access patterns, and failed authentication attempts should trigger alerts. Without this monitoring, you may not know a breach occurred until an external party reports it.

What Compliant AWS Architecture Looks Like A HIPAA-compliant AI pipeline on AWS uses: customer-managed KMS keys for all encryption, VPC-isolated SageMaker endpoints, application-level audit logging to object-locked S3, role-based access controls enforced at both application and data layers, CloudTrail enabled across all regions, Comprehend Medical for PHI detection in inputs and outputs, and a documented incident response plan tested at least annually. This architecture is not significantly more expensive than a non-compliant one — most of the controls are configuration rather than additional services. The cost of retrofitting compliance into a system that was not designed for it is consistently higher than building it correctly the first time.

Share this article

By LTK Group Engineering Team | Bangalore, India

Building a Healthcare AI System? Get a Free Compliance Architecture Review.

Book Free Technical Call