AWS CloudFormation vs Conftest
AWS CloudFormation
aws.amazon.comConftest
conftest.devSide by side
| Figure | AWS CloudFormation | Conftest |
|---|---|---|
| Price from | Free | Free |
| Free plan | Yes | Yes |
| Free trial | — | — |
| Open source | — | — |
| Web | Yes | — |
| Windows | Yes | Yes |
| macOS | Yes | Yes |
| Linux | Yes | Yes |
| iOS | Yes | — |
| API | Yes | — |
| Plans published | 3 | 1 |
| Spec score · Infrastructure Policy as Code Tools | 9.1 (#1) | 8.5 (#5) |
| Spec score · Infrastructure Testing Tools | 9.1 (#3) | 8.4 (#4) |
| Spec score · Infrastructure as Code Security Software | 9.0 (#3) | 8.4 (#7) |
| Purpose | CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. | Conftest is a utility for writing tests against structured configuration data. |
Plans
AWS CloudFormation
- AWS CloudFormationFree
- CloudFormation serviceFree
- Third-party resource providersFree
In their own words
AWS CloudFormation
AWS CloudFormation models, provisions, and manages related AWS and third-party resources as infrastructure as code. YAML or JSON templates define AWS resources and their properties. StackSets deploy a common set of resources across multiple AWS accounts and Regions; Change Sets preview proposed stack updates, including possible deletion or replacement, and Drift Detection tracks changes made outside the service. For authoring, AWS CDK supports TypeScript, Python, Java, and .NET, while AWS SAM offers shorthand YAML for serverless resources that is converted during deployment. The CloudFormation Registry supports third-party resources and modules, and stacks can be updated from remote Git repositories. The service is available through API, Linux, macOS, web, and Windows, and manages state. CloudFormation itself has a free plan, with no additional charge for AWS and Alexa resource providers, but created AWS resources are billed at their standard rates. Third-party provider and custom hook operations may also incur charges. Access can be managed with IAM, and CloudTrail logs API calls.
Conftest
Conftest is a free utility for testing structured configuration data, designed for use in CI environments. It uses the Open Policy Agent Rego language to express policies, then evaluates deny, violation, and warning rules within namespaces. Configuration can be read from individual files, directories, multiple files, or standard input. Supported inputs include Kubernetes-style YAML, JSON, HCL and HCL2, Dockerfiles, Terraform-related data, JSONnet, TOML, and XML. Results can be output as plaintext, JSON, TAP, table, JUnit, GitHub, Azure DevOps, or SARIF; the GitHub outputter can annotate test results in workflows. The `conftest verify` command runs policy unit tests. Policies can be pulled from HTTPS URLs, Git repositories, and OCI registries, or pushed to compatible OCI registries. Plugins extend the CLI, with downloads available from sources including OCI, Git, HTTP/HTTPS, Mercurial, and cloud storage. Pre-commit hooks support policy workflows, and integrations are documented for CircleCI, GitHub Actions, and Tekton. Conftest is available for Linux, macOS, and Windows.