Skip to content
Cloud Governance Tools

Compliance as code packages control checks as deployable rule bundles, and most cloud bundles report rather than block

Compliance as code means expressing control checks as files a machine can deploy and run. AWS Config conformance packs bundle Config rules and remediation actions, Azure Policy ships regulatory compliance initiatives, and the ComplianceAsCode project publishes host hardening content. Read on 16 Nov 2026, this page separates those bundles from guardrails that block.

See the ranking ยท All guides

Four kinds of bundle exist, and they differ in where they run

Cloud Custodian's documentation also has a Compliance as Code section; see Cloud Custodian for the engine.

BundleWhat AWS, Microsoft or the project saysRuns against
AWS Config conformance packA collection of AWS Config rules and remediation actions, deployed as a single entity in an account and Region or across an organization; authored as a YAML templateAWS resource configuration
Azure Policy regulatory compliance initiativeBuilt-in initiative definitions listing controls and compliance domains by responsibility (Customer, Microsoft, Shared); the feature is marked PreviewAzure resources
AWS Control Tower control groupsControls are grouped by objective, framework, service and group, with a Frameworks category of industry-standard compliance frameworksAWS accounts in an OU
ComplianceAsCode contentSecurity automation content in SCAP, Bash, Ansible and other formats; repository topics include pci-dss, stig and security-hardeningHosts and configurations

A bundle that reports does not stop the change that breaks it

AWS says Config rules implement Control Tower's detective controls, which detect noncompliance after a resource exists and alert through a dashboard. Preventive controls are the ones implemented with service control policies and resource control policies. A conformance pack of Config rules is on the reporting side, though AWS also lets a pack carry remediation actions.

This is the point where compliance as code meets the subject of this site. A pack that says an S3 bucket is public tells you after the fact. A guardrail such as Deny changes to S3 Block Public Access at bucket level prevents the change. The split is explained in preventive vs detective controls.

Azure's initiative structure carries the compliance mapping inside the policy file

Microsoft documents that an initiative definition is JSON that groups related policy definitions so they can be assigned as one item. It also contains policy groups, a property that belongs to the Regulatory Compliance (Preview) feature. The mapping from policy to control therefore lives in the initiative file itself.

The built-in initiatives page lists items by standard, including a HITRUST/HIPAA initiative and PCI DSS v4. Microsoft says the controls map to the corresponding compliance standard, and that existing compliance standard initiatives are being updated to support Regulatory Compliance. Assigning one is the same act as assigning any policy: it can start in audit and later be enforced, as in Azure Policy as a guardrail.

Four questions decide whether a bundle fits a guardrail program

The questions are this page's own checklist, built from the documented behavior above.

  • Does the bundle block, or only report? Read the effect or the control type, not the bundle name.
  • Does it cover accounts that are not enrolled? AWS says detective controls apply to enrolled accounts only.
  • Can it be tried first? Azure assignments can use DoNotEnforce, and Config rules can be deployed and read before remediation is attached.
  • Who owns an exception, and when does it end? See guardrail exceptions and waivers.

Passing the rules is evidence about configuration, not proof that a control is met

A rule bundle checks the settings its authors encoded. A control statement in a standard may need an interview, a log review or a process. Which framework control each rule satisfies is a mapping job that this page does not cover.

What a team can do with a bundle is keep the checks in version control, run them on a schedule and keep each result. For the engines that run such checks, see policy as code tools, and for the layer of rules that block, see the library and the method.

Sources

  1. AWS Config: conformance packs, read 16 Nov 2026
  2. Microsoft: regulatory compliance in Azure Policy, read 16 Nov 2026
  3. Microsoft: initiative definition structure, read 16 Nov 2026
  4. Microsoft: built-in initiatives, read 16 Nov 2026
  5. AWS Control Tower: proactive controls, read 10 Nov 2026
  6. AWS Control Tower: detective controls, read 10 Nov 2026
  7. GitHub: ComplianceAsCode/content, read 16 Nov 2026
  8. Cloud Custodian: quick start, read 16 Nov 2026

Last reviewed 16 Nov 2026.