Sign in
Menu
Start free trial
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 75 of 102 HIPAA controls in the catalog. Of the 80 that cite a HIPAA clause, they enforce 57. 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, and resources written by hand outside modules once your team switches to the compliance.tf provider.
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: 23 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 HIPAAcomes from your org's configuration.

C.3

Enforced and mapped, by section

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

164.31245 of 61
164.30830 of 46
164.3145 of 7

The catalog maps 22 more controls to HIPAA without naming a clause, 18 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).

80 of 80 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 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)
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)
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 be in a VPCEnforced164.312(e)(1)
EC2 instances should not have a public IP addressEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(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)
EKS clusters should be configured to have kubernetes secrets encrypted using KMSEnforced164.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)
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)
EMR cluster Kerberos should be enabledEnforced164.312(a)(1)
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)
OpenSearch domains should use HTTPSEnforced164.314(b)(2)(iv)
OpenSearch domains should be in a VPCEnforced164.312(a)(1)
OpenSearch domains node-to-node encryption should be enabledEnforced164.308(a)(4)(ii)(A), 164.312(e)(1)
RDS DB instances and clusters should have enhanced monitoring enabledEnforced164.312(b)
RDS DB instance backup should be enabledEnforced164.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)
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)
RDS DB instances should have iam authentication enabledEnforced164.308(a)(4)(i)
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)
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 cluster encryption in transit should be enabledEnforced164.314(b)(2)(iv)
Redshift clusters should have enhanced VPC routing enabledEnforced164.312(e)(1)
Redshift clusters should have KMS encryption enabledEnforced164.314(b)(2)(iv)
S3 buckets should have cross-region replication enabledEnforced164.312(a)(2)(ii)
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 prohibit public read accessEnforced164.308(a)(1)(ii)(B), 164.308(a)(3)(i), 164.312(a)(1), 164.312(a)(2)(i)
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 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 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)
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)
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)
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)
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)
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)
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)

Enforced or mapped without a named HIPAA clause

The catalog lists these 22 controls under HIPAA but names no HIPAA clause for them, so the register and the counts in C.3 leave them out. Each still links to its docs page.

ControlStatus
CloudFront distributions should require encryption in transitEnforced
EFS file systems should be encrypted with CMKEnforced
ELB application load balancers should be configured to drop HTTP headersEnforced
ELB application and network load balancer listeners should use secure protocolsEnforced
RDS DB instances backup retention period should be greater than or equal to 7Enforced
RDS DB instances should have logging enabledEnforced
RDS for MariaDB DB instances should publish logs to CloudWatch LogsEnforced
RDS DB instances should not use public subnetEnforced
RDS for PostgreSQL DB instances should publish logs to CloudWatch LogsEnforced
RDS DB instances should prohibit public accessEnforced
RDS for SQL Server DB instances should publish logs to CloudWatch LogsEnforced
Redshift clusters should have automatic snapshots enabledEnforced
Redshift clusters should have audit logging and encryption enabledEnforced
Redshift clusters should have required maintenance settingsEnforced
Redshift clusters should prohibit public accessEnforced
S3 buckets should have default encryption enabledEnforced
S3 buckets should have policies that prohibit public accessEnforced
S3 public access should be blocked at account levelEnforced
CloudTrail trails should have at least one enabled trail present in a regionMapped
IAM password policies should have strong configurations with minimum length of 8 or greaterMapped
IAM password policies should have strong configurationsMapped
S3 buckets should have object logging enabledMapped

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.