Infra Stack Review

Baking SOC 2 and HIPAA Into Your AWS Deployment Pipeline on Day One

Embed compliance checks in your deployment pipeline from day one, not months before audit time.

Columnist · · 11 min read
Cover illustration for “Baking SOC 2 and HIPAA Into Your AWS Deployment Pipeline on Day One”
Cloud Compliance · October 4, 2026 · 11 min read · 2,570 words

The fastest path to SOC 2 and HIPAA readiness on AWS is building compliance into the deployment pipeline itself, not treating it as paperwork to assemble before an audit. A three-layer system, infrastructure-as-code scanning in CI, continuous AWS-native monitoring, and automated evidence collection, lets a small team pass audits without a dedicated compliance hire. Startups that wait until a deal is on the line to prove their controls lose that deal, because auditors don't accept a security posture that only existed last week.

A team can have least-privilege IAM set up everywhere, encryption on at rest and in transit, and MFA enforced across every account, and it can still fail an audit. Auditors evaluating SOC 2 Type II or HIPAA need proof that controls operated effectively across a continuous window, often six to twelve months, not a snapshot taken the week before fieldwork starts. If none of that work is documented in a form an outside auditor can verify, it doesn't count. Procurement teams asking for a SOC 2 report don't want a promise that security is handled. They want evidence it's been handled continuously, and a startup that can't produce it watches the deal go to a competitor who had the paperwork ready first.

The cost of catching up late is specific and large. If you retrofit compliance, you typically pull engineers off product work for months at a stretch to gather screenshots, export CloudTrail logs by hand, and fill out spreadsheets listing who had access to what and when. That effort runs in parallel with an audit firm bill that lands well into six figures. And the longer a company has been running fast and loose, the worse the reconstruction gets: every manual console change made during a late-night incident, every IAM grant someone added to unblock a deploy, every bit of configuration drift that built up during early growth has to be found, explained, and justified after the fact.

Misconfigurations are the common thread running through almost every cloud breach and compliance failure: overly permissive IAM roles, S3 buckets left open to the public, databases reachable from the internet, audit logging that was never turned on. Catching these before deployment is cheaper than catching them during an incident review or an audit finding. That timing difference is the whole argument for this piece. Compliance built into the deployment pipeline from day one, not bolted on later, removes the manual evidence-gathering scramble that derails product teams for months. Tools like Porter fold compliance checks directly into CI/CD, so SOC 2 and HIPAA controls run continuously across the audit window instead of getting reconstructed under deadline pressure. The rest of this piece lays out what that architecture actually looks like, layer by layer.

What SOC 2 and HIPAA require from an AWS environment, in concrete terms

SOC 2 and HIPAA ask for overlapping things, weighted differently. An AWS environment built correctly satisfies both at once instead of requiring two separate efforts.

SOC 2 is organized around five Trust Service Criteria: Security, Availability, Confidentiality, Processing Integrity, and Privacy. Most early-stage companies pursuing a Type II report only need to satisfy Security, which covers logical access controls, change management, risk assessment, incident response, and monitoring for unusual activity. A 2022 revision to the underlying Trust Services Criteria updated supplemental guidance around logical access in cloud environments, patch management, and privacy alignment, but it added no brand-new controls for cloud security or secure coding. In AWS terms, satisfying SOC 2's Security criterion looks like IAM policies enforcing least privilege, AWS Config rules continuously checking for things like public S3 buckets and unencrypted EBS volumes, and AWS Security Hub pulling all of that into one place an auditor can review.

HIPAA covers Protected Health Information and is more prescriptive about mechanism. It requires access controls, audit controls, integrity checks, transmission security, and backup and disaster recovery. Translated into AWS services, that means PHI encrypted both in transit and at rest, access locked down tightly, and audit trails that can't be altered after the fact, enforced through AWS Config rules on S3 and RDS, organization-wide CloudTrail logging, and IAM Identity Center for managing who can reach what.

There's a legal step that has to happen before any of the technical work matters. Any company that creates, receives, maintains, or transmits PHI on behalf of a covered entity is a Business Associate under HIPAA, and AWS, as a subcontractor business associate, produces this obligation by handling PHI underneath that covered entity. It's obtained through a self-service console provided by the cloud vendor, and it's non-negotiable: an auditor will ask for it first, before looking at a single control. Signing the BAA doesn't make a company HIPAA-compliant on its own, but operating without one makes every other control irrelevant to the auditor.

AWS operates on a shared responsibility model: AWS secures the infrastructure underneath, while the customer is on the hook for access control, data protection, configuration, monitoring, and every compliance control running inside the account. PCI DSS, for companies handling cardholder data, draws on this same foundation of encryption, access control, and logging, though it isn't the focus here. What matters most for SOC 2 and HIPAA specifically: the controls that satisfy SOC 2's CC6 criteria and HIPAA's §164.312 technical safeguards are the same controls, encryption, access control, audit logging, integrity checks, and transmission security, and every one of them can be written as infrastructure code and checked automatically rather than manually reviewed once a year.

The three-layer compliance architecture

Diagram: Three Layers of Compliance Automation — and Why the Order Matters. Visualizes: Visualize a three-layer stack showing how compliance automation builds from bottom to top: Layer 1 (IaC scanning in CI — catches misconfigurations before…

Compliance automation works as a stack, not a single purchase, and skipping any one of its three layers leaves a gap an auditor will eventually find.

Layer one is infrastructure-as-code scanning. It catches misconfigurations in CI before anything reaches AWS. Layer two is continuous cloud resource monitoring, because things drift, so it verifies that what's actually running in the account matches what was intended. Layer three is a compliance platform that pulls evidence out of the first two layers and maps it to the specific control objectives SOC 2 and HIPAA ask for, automatically, rather than through a spreadsheet someone updates by hand once a quarter.

The order isn't arbitrary. Layer one is the cheapest place to catch a problem, because it stops bad configuration before it ever deploys, and it produces a timestamped record simply by running. Layer two exists because IaC scanning can't see everything: a manual change made in the AWS console, an API call that bypasses Terraform entirely, a resource inherited from an acquisition nobody wrote infrastructure code for. None of that shows up in a CI scan. Layer three turns the output of the first two into something an auditor can actually sit down and review.

Auditors don't care whether a control was enforced by an automated CI gate or documented in a manual policy. They care whether the control was in place and working for the entire audit period, start to finish. A compliance dashboard showing all green checkmarks next to a misconfigured AWS account is expensive decoration, nothing more. The value chain that actually holds up: IaC scanning stops misconfigurations before they ship, Security Hub watches what does ship, and platforms like Vanta or Drata assemble that continuous record into something an auditor can sign off on. The next two sections walk through how the first two layers actually get built.

Layer one: catching misconfigurations in CI before they reach AWS

If you run Checkov inside a CI pipeline with the right flags set, every single deployment becomes a timestamped piece of compliance evidence, and you end up with six months of audit documentation as a side effect of normal work.

Checkov doesn't ship with a built-in --compliance hipaa flag, so running only the checks relevant to HIPAA means passing specific check IDs explicitly, something like --check CKV_AWS_19,CKV_AWS_17, covering things like S3 encryption and RDS encryption settings. If an auditor later asks for proof that every S3 bucket and RDS instance enforced encryption at rest for the last six months, you can point to a CI log history that shows that exact check running and passing on every single deploy. That's a stronger answer than a policy document claiming encryption is enabled.

Terrascan, originally from Accurics and now maintained by Tenable, runs on Open Policy Agent policies under the hood. That matters because it means custom compliance checks can be written in Rego for things that don't map to any built-in check, like requiring a data-classification tag on every resource that touches personal information.

The pipeline itself should follow one foundational rule: build once, promote many. A single artifact gets produced in CI and that exact artifact moves through staging and into production, with no rebuilding along the way. Security checks and release gates sit as explicit, visible stages in that path. There's no separate production-only shortcut that skips them.

How strictly to enforce findings creates a real tension. If you block every high-severity result outright, you eventually burn developer trust and slow releases to a crawl. Policy-as-code tools like Open Policy Agent let a team decide which severity levels actually stop a deploy: critical and high findings block the pipeline, medium and low findings get logged and flagged but don't stop the build. A GitHub Actions step running Checkov with --hard-fail-on HIGH can block a merge on high-severity findings, but only if severity metadata is actually available, and that requires either a Prisma Cloud or Bridgecrew API key, or custom policies explicitly tagged with severity. Without one of those in place, the flag matches nothing, so the gate fails open and no one notices. A softer approach, flagging findings with a required pull request comment rather than a hard block, keeps velocity intact while still leaving an auditable trail.

Every exception to a security rule needs an owner, an expiration date, a written justification, and a clear approval path. If an exception expires, it should fail the next deployment attempt until someone renews it or fixes the underlying issue, so it never quietly stays open forever.

For Kubernetes workloads, running kube-bench during node provisioning checks compliance against CIS benchmarks, and adding Trivy covers container image scanning. Both produce machine-readable output that feeds directly into the same evidence store as everything else.

Layer two: AWS-native tooling that monitors what deployed

Three AWS services, Config, Security Hub, and Audit Manager, work together as a feedback loop that watches what's actually running in an account, not just what the infrastructure code says should be running. An auditor will reject all of it unless a multi-account structure is in place underneath it.

AWS Config rules check encryption, access, and network settings continuously, so no one has to remember to look. Security Hub pulls findings from Config, GuardDuty, IAM Access Analyzer, and other services into one place to review. You configure CloudTrail at the organization level, so logs get written to a separate Logs Archive Account that nobody can edit or delete, even by accident. Audit Manager becomes the final, organized package handed to the auditor, and it's built from the continuous record Config and Security Hub have already assembled rather than reconstructed after the fact.

A compliant AWS setup usually needs at minimum five accounts: a Security account for centralized logging and Security Hub and GuardDuty aggregation, a Production account for regulated workloads locked down with strict Service Control Policies, a Staging account for pre-production validation, a Development account where engineers get more relaxed permissions to move fast, and a Sandbox account for experimentation with spending limits attached. Service Control Policies act as guardrails that apply across the whole organization: no disabling CloudTrail, no public S3 buckets, no creating new IAM users outside the approved process, no deploying into regions nobody approved. Those policies hold even if someone with elevated privileges tries to misconfigure something, whether on purpose or not.

One of the most common gaps auditors flag is standing admin access, developers who have permanent, broad access to production because it's convenient day to day. It's also the thing that makes a breach worse when one happens, since a compromised credential with permanent admin rights can do far more damage than one scoped narrowly and only active for an hour. Just-in-time access through IAM Identity Center fixes this directly: access gets granted for a specific task, expires automatically, and gets logged the entire time it's active.

Mattias Hemmingsson, Head of Security at Hippo, described what a structured multi-account setup does for an audit conversation: "This setup makes life really simple from a compliance perspective, because I can clearly show: 'This is the account where we have the sensitive data, and you can see it's really locked down.' The segmentation of the network, how accounts are set up, and the structure, it's super helpful for compliance."

The encryption baseline across all of this is consistent: AWS KMS encrypting data at rest across S3 using SSE-KMS, EBS volumes, RDS and Aurora, DynamoDB, EFS and FSx, and Redshift, with TLS 1.2 or higher enforced for anything moving across the network.

Timing decides whether any of this actually counts as evidence. Security Hub needs to be turned on from day one, not activated the month before an audit. You should start a compliance platform like Vanta or Sprinto at the beginning of the chosen observation window, typically three to six months before audit fieldwork begins, so you cover the entire evidence period instead of only part of it. A bring-your-own-cloud approach to deployment reinforces this naturally: because infrastructure runs inside a company's own cloud account rather than a vendor's, the company retains ownership of the controls and can enforce IaC scanning, continuous monitoring, and evidence collection at the exact point where compliance risk is cheapest to catch, the deployment layer itself.

The compliance boundary AI and ML workloads create

The HIPAA compliance boundary for an AI workload doesn't sit at the model or the GPU it runs on. It sits wherever PHI touches the inference pipeline, and most teams find that boundary only after they have already shipped past it.

The common failure pattern looks simple from the outside: a team builds a model, wires it into a product feature, and ships it, treating the model as just another service behind an API. But if patient data, clinical notes, lab results, anything qualifying as Protected Health Information, flows into that inference pipeline as a prompt, a feature vector, or a logged request, the model's hosting environment now falls under the exact same HIPAA obligations as a database holding patient records. Logging that captures raw prompts for debugging can turn a debug log into an unencrypted PHI repository. If a third-party inference API never signed the required HIPAA agreement with the company, a product launch can turn into a HIPAA violation, and a customer's security review ends up catching it instead of you.

Everything built in the previous two layers, IaC scanning, AWS Config rules, Security Hub, the multi-account structure, still applies. None of it automatically knows that a particular model endpoint is processing PHI unless someone has explicitly drawn that line and enforced it with the same encryption, access control, and audit logging requirements that apply to an RDS instance. If you are a startup building AI products on top of health data, the three-layer architecture described above is your foundation. The inference pipeline is where that foundation has to extend, deliberately, before the first production request carrying patient data ever reaches a model.

Sources

  1. AWS Cloud Security Checklist for HIPAA, SOC2 & PCI DSS
  2. AWS Security & Compliance: SOC 2, HIPAA & GDPR on the Cloud
Filed underCloud Compliance

More in Cloud Compliance