Developer Tools · head to head
AWS CloudFormation vs Terraform

AWS CloudFormation
Developer Tools
Declarative infrastructure as code for AWS, free for AWS resources
- From
- Free
- Free plan
- Yes

Terraform
Developer Tools
Automate infrastructure on any cloud
- From
- Free
- Free plan
- Yes
The short version
- Terraform is an infrastructure as code tool.
- AWS CloudFormation is free; Terraform starts at $0.1/mo.
- Only AWS CloudFormation lists stacks and templates; only Terraform lists infrastructure as code.
- Where AWS CloudFormation falls short: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it.
- Where Terraform falls short: HCL syntax requires learning a domain-specific language with limited GUI alternatives.
How do AWS CloudFormation and Terraform differ?
AWS CloudFormation and Terraform differ on platforms. Only the attributes on which AWS CloudFormation and Terraform actually diverge.
| Attribute | AWS CloudFormation | Terraform |
|---|---|---|
| Platforms | Web, Linux, macOS, Windows | Linux, macOS, Windows |
Identical on both: starting price (Free), free tier (Yes).
Not yet recorded: pricing model for Terraform, category for AWS CloudFormation, founded for AWS CloudFormation.
Which features does each one have?
They share no listed features; 6 appear only for AWS CloudFormation and 20 only for Terraform. Drawn from each product's published feature list. An absence here means we hold no record of it - not that the product lacks it.
Only in AWS CloudFormation
- Stacks and templates
- Change sets
- Drift detection
- StackSets
- Rollback
- Registry extensions
Only in Terraform
- Infrastructure as code
- Resource graph
- Plan & apply
- State management
- Provider ecosystem
- Modules
- Workspaces
- Remote backends
What is each one used for?
AWS CloudFormation is most often brought in for recreating identical dev, staging and production environments on AWS; Terraform for multi-cloud provisioning. The jobs each tool is most often brought in to do.
AWS CloudFormation
- Recreating identical dev, staging and production environments on AWSnot Terraform
- Deploying one baseline of security resources across many accounts with StackSetsnot Terraform
- Serverless applications packaged with AWS SAMnot Terraform
- Previewing and auditing infrastructure changes through change setsnot Terraform
Terraform
- Multi-cloud provisioningnot AWS CloudFormation
- Infrastructure automationnot AWS CloudFormation
- Environment replicationnot AWS CloudFormation
- Disaster recoverynot AWS CloudFormation
- Compliance automationnot AWS CloudFormation
Where do AWS CloudFormation and Terraform fall short?
AWS CloudFormation's most cited limit: it only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it. Terraform's: HCL syntax requires learning a domain-specific language with limited GUI alternatives. Documented limitations, not opinions. Every one is a constraint you would hit in normal use.
AWS CloudFormation
- It only manages AWS, so multi-cloud estates need Terraform or Pulumi alongside it
- Raw templates are verbose and hard to reuse, which is why many teams add CDK on top
- A failed update can leave a stack in a stuck state such as UPDATE_ROLLBACK_FAILED that needs manual intervention
- New AWS features sometimes arrive in CloudFormation after the console and API, so you wait or script around the gap
- Deleting a stack deletes its resources, so a mistaken delete of a stack with data needs DeletionPolicy discipline
Terraform
- HCL syntax requires learning a domain-specific language with limited GUI alternatives
- State file management is complex, especially at scale with multiple workspaces
- terraform import workflow is fiddly and must be done one resource at a time
- No native error handling or try-catch capabilities like traditional programming languages
- No automatic rollback capability - must manually delete and re-run if needed
How much do AWS CloudFormation and Terraform cost?
AWS CloudFormation is free to use; Terraform has a free plan, with paid plans from $0.1/mo. Plan by plan below, from each vendor's own pricing page.
AWS CloudFormation
Free- AWS resource typesFree
- No additional charge for using CloudFormation with AWS resources
- You pay for the resources the stack creates
- Third-party extensionsOn request
- $0.0009 per handler operation, first 1,000 per month free
- $0.00008 per second of handler duration beyond 30 seconds
Terraform
Free- HCP Terraform Essentials$0.1/resource/month
- HCP Terraform Standard$0.47/resource/month
- HCP Terraform Premium$0.99/resource/month
Which should you pick?
Choose AWS CloudFormation if
- You need stacks and templates.
- You want to start without paying.
- You work on Web, Linux, macOS, Windows.
- You also want change sets.
Choose Terraform if
- You need infrastructure as code.
- You want to start without paying.
- You work on Linux, macOS, Windows.
- You also want resource graph.
Questions people ask
- Is AWS CloudFormation or Terraform better?
- It depends on the job. AWS CloudFormation fits recreating identical dev, staging and production environments on AWS; Terraform fits multi-cloud provisioning. AWS CloudFormation starts at Free and Terraform at Free.
- Which is cheaper, AWS CloudFormation or Terraform?
- AWS CloudFormation starts at Free and Terraform at Free.
- Does AWS CloudFormation or Terraform run on more platforms?
- AWS CloudFormation runs on Web, Linux, macOS, Windows. Terraform runs on Linux, macOS, Windows.
- Can I use AWS CloudFormation for free?
- Both have a free tier, so you can try either at no cost before committing.
- What is AWS CloudFormation best used for?
- AWS CloudFormation is most often used for recreating identical dev, staging and production environments on aws, deploying one baseline of security resources across many accounts with stacksets, serverless applications packaged with aws sam, previewing and auditing infrastructure changes through change sets. Of those, recreating identical dev, staging and production environments on aws and deploying one baseline of security resources across many accounts with stacksets are not what Terraform is typically brought in for.
- What can AWS CloudFormation do that Terraform cannot?
- AWS CloudFormation covers Stacks and templates, Change sets, Drift detection, StackSets. Terraform covers Infrastructure as code, Resource graph, Plan & apply, State management.
Answered from the vendors’ own pages
AWS CloudFormation: Does CloudFormation cost money?
Not for AWS resource types. You pay for the resources it creates; third-party extensions are billed at $0.0009 per handler operation after 1,000 free.
Terraform: Is there a free tier?
Yes. The free tier supports up to 500 managed resources and 1 concurrent run. The legacy free tier ends March 31, 2026; remaining organizations auto-convert to the enhanced free tier.
SourceAWS CloudFormation: CloudFormation or Terraform?
CloudFormation is AWS-only with state managed by AWS; Terraform spans many providers and keeps its own state.
Terraform: What clouds does Terraform support?
Terraform supports AWS, Microsoft Azure, Google Cloud Platform, Oracle Cloud, Docker, and HashiCorp's own HCP Terraform managed service, with over 2000 providers available.
SourceAWS CloudFormation: How does CDK relate?
CDK lets you write infrastructure in a programming language and synthesises CloudFormation templates.
Terraform: Do I need HCP Terraform Cloud or can I run locally?
Terraform runs locally by default, storing state on your machine. For team collaboration and production use, remote backends like S3, Azure Storage, or HCP Terraform are recommended for locking and security.
SourceTerraform: Is HCL hard to learn?
HCL is designed to be human-readable and sits between JSON and YAML. It supports comments, variables, functions, and conditional logic. While beginners can get started quickly, mastering advanced features takes practice.
SourceRelated pages
More on AWS CloudFormation
Other head to heads
- AWS CloudFormation vs Spacelift
- AWS CloudFormation vs env zero
- AWS CloudFormation vs Atlantis
- AWS CloudFormation vs LocalStack
- AWS CloudFormation vs Coder
- AWS CloudFormation vs Tilt
- AWS CloudFormation vs Harness
- AWS CloudFormation vs Argo CD
- AWS CloudFormation vs Envoy
- AWS CloudFormation vs HCP Terraform
- AWS CloudFormation vs Daytona
- AWS CloudFormation vs Xlinesoft
- AWS CloudFormation vs GitHub Copilot
- AWS CloudFormation vs Visual Studio Code
- AWS CloudFormation vs Kubernetes
- AWS CloudFormation vs Claude Code
- AWS CloudFormation vs Docker
- AWS CloudFormation vs Ansible
- AWS CloudFormation vs LaunchDarkly
- AWS CloudFormation vs AWS CDK
- AWS CloudFormation vs Jenkins
- AWS CloudFormation vs Losant
- AWS CloudFormation vs Earthly
- AWS CloudFormation vs CodeSandbox
- AWS CloudFormation vs Depot
- AWS CloudFormation vs Neovim
- AWS CloudFormation vs Turborepo
- AWS CloudFormation vs Arduino Cloud
- AWS CloudFormation vs AWS Serverless Application Model (AWS SAM)
- Terraform vs Spacelift
- Terraform vs env zero
- Terraform vs Atlantis
- Terraform vs LocalStack
- Terraform vs Coder
- Terraform vs Tilt
- Terraform vs Harness
- Terraform vs Argo CD
- Terraform vs Envoy
- Terraform vs HCP Terraform
- Terraform vs Daytona
- Terraform vs Xlinesoft
- Terraform vs GitHub Copilot
- Terraform vs Visual Studio Code
- Terraform vs Kubernetes
- Terraform vs Claude Code
- Terraform vs Docker
- Terraform vs Ansible
- Terraform vs LaunchDarkly
- Terraform vs AWS CDK
- Terraform vs Jenkins
- Terraform vs Losant
- Terraform vs Earthly
- Terraform vs CodeSandbox
- Terraform vs Depot
- Terraform vs Neovim
- Terraform vs Turborepo
- Terraform vs Arduino Cloud
- Terraform vs AWS Serverless Application Model (AWS SAM)
