At AWS re:Invent? Bring your audit questions to Anton Babenko.Meet Anton at AWS re:InventAsk for a time
Sign in
Menu
Start free
Annex C: HIPAA

HIPAA controls built into your Terraform modules. Enforced before apply.

PHI on AWS needs encryption at rest and in transit, audit logging, access controls and backups. The modules enforce these controls before apply and list the HIPAA Security Rule section each one maps to, where the catalog names one.

Modules enforce 70 of 104 HIPAA controls in the catalog. Of the 92 that cite a HIPAA clause, they enforce 62. The controls they do not enforce stay with your team, with BAAs, workforce training, risk analysis and breach notification.

No credit card or AWS account needed to start. By Anton Babenko, maintainer of terraform-aws-modules, more than 2 billion provisions.

Annex C: HIPAA

Framework
HIPAA Security Rule, Omnibus Rule 2013
For
Your team, on Terraform
C.1

Scope for HIPAA

If your application handles protected health information (PHI), the Security Rule applies to every AWS resource that touches it. If you are pursuing HITRUST, these controls also map to HITRUST CSF requirements; the certification still needs your organizational controls.

C.1.1

Covers

  • Infrastructure controls on AWS resources that map to HIPAA Security Rule sections, by section in C.3.
  • terraform-aws-modules through the HIPAA framework host or your org endpoint. Once your team switches to the compliance.tf provider, resources written by hand outside modules are checked against its built-in CIS controls, not the HIPAA set.
C.1.2

Stays with your team

  • Business Associate Agreements. Compliance.tf does not store, process or transmit PHI and signs no BAA; you need one with AWS and with each service that handles PHI.
  • Workforce training and security awareness.
  • Physical safeguards for facilities and workstations.
  • Breach notification procedures and timelines.
  • Administrative policies and procedures.
  • Risk analysis and risk management.
  • Patient rights and access requests.
  • Resources outside compliance.tf module coverage, and every control C.4 lists as Mapped: 30 with a HIPAA clause and 4 without one.
C.2

The source line

Point a module at the HIPAA framework host. Same inputs and outputs, no state migration. Terraform 1.0 or later.

-  source  = "terraform-aws-modules/s3-bucket/aws"
+  source  = "hipaa.compliance.tf/terraform-aws-modules/s3-bucket/aws"
   version = "~> 5.0"

With an org endpoint, the source names your org host instead, and HIPAA comes from your org's configuration.

C.3

Enforced and mapped, by section

Of the 92 HIPAA controls in the documented catalog that cite a clause, modules enforce 62. A control appears once under each section it maps to.

164.31246 of 69
164.30829 of 47
164.31414 of 21

The catalog maps 12 more controls to HIPAA without naming a clause, 8 of them enforced. They are listed apart at the end of C.4 and left out of these counts.

Every row is a control your auditor can look up.

Filter the register, or search by control name or clause, for example 164.312(b).

92 of 92 shown

Each control links to its public docs page.

Enforced
Modules set this control before anything is deployed.
Mapped
Documented on its docs page, not set by modules. Your team owns it.
C.4

Control register

ControlStatusHIPAA clauses
CloudFront distributions should require encryption in transitEnforced164.312(e)(1)
CloudFront distributions access logs should be enabledEnforced164.308(a)(1)(ii)(D)
CloudWatch alarms should have an action configuredEnforced164.312(b)
CloudWatch log groups should have retention period of at least 365 daysEnforced164.312(b)
DMS replication instances should not be publicly accessibleEnforced164.312(e)(1)
DynamoDB tables should have AWS KMS encryption enabledEnforced164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii)
DynamoDB tables should have encryption enabledEnforced164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
DynamoDB tables should have point-in-time recovery enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(7)(i), 164.308(a)(7)(ii)(A), 164.308(a)(7)(ii)(B), 164.308(a)(7)(ii)(C), 164.312(a)(2)(ii)
Attached EBS volumes should have encryption enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(c)(1), 164.312(c)(2), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
EC2 instances should have detailed monitoring enabledEnforced164.312(b)
EC2 instances should have EBS optimization enabledEnforced164.312(a)(2)(ii)
EC2 instances should have IAM profile attachedEnforced164.312(a)(1)
EC2 instances should not have a public IP addressEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(e)(1)
EC2 instances should use IMDSv2Enforced164.312(a)(1)
EFS file systems should have encryption at rest enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii)
ElastiCache Redis clusters should have automatic backups enabled with a retention period of 15 days or greaterEnforced164.312(a)(2)(ii)
ELB application and classic load balancer logging should be enabledEnforced164.308(a)(1)(ii)(D), 164.308(a)(3)(ii)(A), 164.308(a)(6)(ii), 164.312(b)
ELB application load balancer deletion protection should be enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(7)(ii)(C)
ELB application load balancers should drop invalid HTTP headersEnforced164.312(e)(2)(ii)
ELB application and network load balancer listeners should use ACM certificatesEnforced164.312(e)(2)(ii)
ELB classic load balancers should have cross-zone load balancing enabledEnforced164.308(a)(7)(ii)(C)
KMS CMK rotation should be enabledEnforced164.312(a)(2)(iv)
Lambda functions should have concurrent execution limit configuredEnforced164.312(b)
Lambda functions should be configured with a dead-letter queueEnforced164.312(b)
Lambda functions should be in a VPCEnforced164.312(e)(1)
Lambda functions should restrict public URLEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1)
Log groups should have encryption at rest enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii)
OpenSearch domains should have encryption at rest enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
OpenSearch domains should use HTTPSEnforced164.314(b)(2)(iv)
OpenSearch domains node-to-node encryption should be enabledEnforced164.308(a)(4)(ii)(A), 164.312(e)(1), 164.314(b)(2)(iv)
RDS DB instances and clusters should have enhanced monitoring enabledEnforced164.312(b)
RDS DB instances should be integrated with CloudWatch logsEnforced164.308(a)(4)(ii)(A), 164.312(b)
RDS DB instances should have deletion protection enabledEnforced164.308(a)(7)(ii)(C)
RDS DB instance encryption at rest should be enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
RDS DB instances should have iam authentication enabledEnforced164.308(a)(4)(i)
RDS DB instances should have logging enabledEnforced164.312(b)
RDS DB instances should have multiple AZ enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(7)(i), 164.308(a)(7)(ii)(A), 164.308(a)(7)(ii)(B), 164.308(a)(7)(ii)(C)
RDS DB instances should prohibit public accessEnforced164.312(e)(1)
Redshift clusters should have audit logging enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(1)(ii)(D), 164.308(a)(3)(ii)(A), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(b), 164.312(e)(2)(ii)
Redshift clusters should have automatic snapshots enabledEnforced164.312(a)(2)(ii)
Redshift cluster encryption in transit should be enabledEnforced164.314(b)(2)(iv)
Redshift clusters should have audit logging and encryption enabledEnforced164.312(e)(2)(ii)
Redshift clusters should have enhanced VPC routing enabledEnforced164.312(e)(1)
Redshift clusters should have KMS encryption enabledEnforced164.314(b)(2)(iv)
Redshift clusters should have required maintenance settingsEnforced164.308(a)(7)(ii)(A)
Redshift clusters should prohibit public accessEnforced164.314(b)(2)(iv)
S3 buckets should have cross-region replication enabledEnforced164.312(a)(2)(ii)
S3 buckets should have default encryption enabledEnforced164.314(b)(2)(iv)
S3 buckets should have default encryption enabled using KMSEnforced164.314(b)(2)(iv)
S3 buckets should have logging enabledEnforced164.308(a)(1)(ii)(D), 164.308(a)(3)(ii)(A), 164.308(a)(6)(ii), 164.312(b), 164.312(e)(2)(i)
S3 buckets should not be accessible to all authenticated usersEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(a)(2)(i)
S3 buckets should have object lock enabledEnforced164.308(a)(1)(ii)(B)
S3 buckets should have policies that prohibit public accessEnforced164.312(a)(1)
S3 buckets should prohibit public read accessEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(a)(2)(i), 164.314(b)(2)(iv)
S3 buckets should prohibit public write accessEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(a)(2)(i), 164.314(b)(2)(iv)
S3 buckets should have versioning enabledEnforced164.308(a)(1)(ii)(B), 164.308(a)(7)(i), 164.308(a)(7)(ii)(A), 164.308(a)(7)(ii)(B), 164.308(a)(7)(ii)(C), 164.312(a)(2)(ii), 164.312(c)(1), 164.312(c)(2)
S3 public access should be blocked at account levelEnforced164.314(b)(2)(iv)
S3 public access should be blocked at bucket levelEnforced164.312(e)(1)
Secrets Manager secrets should be encrypted using CMKEnforced164.312(e)(2)(ii)
SNS topics should be encrypted at restEnforced164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii)
VPC subnet auto assign public IP should be disabledEnforced164.312(e)(1)
WAFv2 rules should have CloudWatch metrics enabledEnforced164.308(a)(1)(ii)(D)
API Gateway REST API stages should have a client certificate configuredMapped164.312(e)(2)(ii)
API Gateway REST API stages should have AWS X-Ray tracing enabledMapped164.312(b)
API Gateway stages should have cache encryption at rest enabledMapped164.312(e)(2)(ii)
API Gateway stages should have logging enabledMapped164.308(a)(1)(ii)(D), 164.308(a)(3)(ii)(A), 164.308(a)(6)(ii), 164.312(b)
Backup plan rules should retain recovery points for at least 35 daysMapped164.312(a)(2)(ii)
CloudTrail trails should have at least one enabled trail present in a regionMapped164.312(e)(2)(i)
CloudTrail trails should be integrated with CloudWatch logsMapped164.308(a)(1)(ii)(D), 164.308(a)(6)(ii), 164.312(b), 164.312(e)(2)(i)
CloudTrail trails should have logs encrypted using a customer managed KMS keyMapped164.308(a)(1)(ii)(B), 164.308(a)(1)(ii)(D), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(c)(1), 164.312(c)(2), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
CloudTrail trails should have log file validation enabledMapped164.308(a)(1)(ii)(B), 164.308(a)(1)(ii)(D), 164.312(b), 164.312(c)(1), 164.312(c)(2)
CodeBuild projects should have logging enabledMapped164.308(a)(1)(ii)(D)
DynamoDB Accelerator (DAX) clusters should be encrypted at restMapped164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
EC2 instances should be in a VPCMapped164.312(e)(1)
EKS clusters should be configured to have kubernetes secrets encrypted using KMSMapped164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
EMR cluster Kerberos should be enabledMapped164.312(a)(1)
ES domain encryption at rest should be enabledMapped164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)
ES domains should be in a VPCMapped164.312(e)(1)
Elasticsearch domain should send logs to CloudWatchMapped164.312(b)
Elasticsearch domain node-to-node encryption should be enabledMapped164.308(a)(4)(ii)(A), 164.312(e)(1), 164.314(b)(2)(iv)
IAM password policies should have minimum length set to 14 or greaterMapped164.308(a)(5)(ii)(D)
IAM password policies should require at least one lowercase letterMapped164.308(a)(5)(ii)(D)
IAM password policies should require at least one numberMapped164.308(a)(5)(ii)(D)
IAM password policies should require at least one symbolMapped164.308(a)(5)(ii)(D)
IAM password policies should require at least one uppercase letterMapped164.308(a)(5)(ii)(D)
IAM password policies should prevent password reuseMapped164.308(a)(4)(ii)(B), 164.308(a)(5)(ii)(D), 164.312(d)
IAM password policies should have strong configurationsMapped164.312(d)
OpenSearch domains should be in a VPCMapped164.312(a)(1)
RDS DB instance backup should be enabledMapped164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.308(a)(7)(i), 164.308(a)(7)(ii)(A), 164.308(a)(7)(ii)(B), 164.308(a)(7)(ii)(C), 164.312(a)(2)(ii)
SageMaker endpoint configuration encryption should be enabledMapped164.314(b)(2)(iv)
SageMaker notebook instances should not have direct internet accessMapped164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(e)(1)
SageMaker notebook instance encryption should be enabledMapped164.308(a)(1)(ii)(B), 164.308(a)(4)(ii)(A), 164.312(a)(2)(iv), 164.312(e)(2)(ii), 164.314(b)(2)(iv)

Clause IDs for the auditor. Your stack stays as it is.

Compliance.tf works alongside your scanners, plan policy, CSPM and GRC tool. It sets the controls in the modules and lists the clause each one is there for.

C.5

Evidence

C.5.1

What compliance.tf gives your auditor

  • The HIPAA clause IDs behind each enforced setting, with stable control IDs and public docs pages.
  • The config snapshot bound to each environment, and the per-action audit log of promotions between environments.
C.5.2

What comes from your AWS account and GRC tool

Evidence of what actually runs comes from your own account, for example AWS Config and your CSPM. Your GRC tool keeps tracking policies and audit workflows.

C.6

Plans for HIPAA

HIPAA is in the 30-day trial and in Full Access, $1,000 a year on AWS Marketplace. Schedule of fees.

C.7

Questions about HIPAA

C.7.1

Which HIPAA safeguards does this cover?

Compliance.tf maps controls to HIPAA Security Rule sections, for example the Technical Safeguards (164.312) and Administrative Safeguards (164.308). These cover access controls, audit controls, integrity controls, transmission security, and encryption. Physical Safeguards (164.310) and the organizational parts of the Administrative Safeguards remain your responsibility.

C.7.2

Can I adopt this gradually, or is it all-or-nothing?

Fully incremental. Start with one module in one environment. Your existing modules continue working untouched. If you use Terragrunt or Terramate to orchestrate your runs, nothing changes - you're only swapping the module source line. There is no global policy agent to deploy, no wrapper binary, no sidecar. Each module source line is independent.

C.7.3

What if we want to switch back?

Each module keeps the inputs and outputs of its terraform-aws-modules counterpart and needs no state migration, so switching back is the same source line change in reverse.