Terraform + AWS

Infrastructure as code with Terraform provisioning Amazon Web Services resources.

  • TerraformTerraform
  • AWSAWS
Learning curve
Moderate
Status
Actively developed
Reviewed
November 2026
Best for
  • Cloud-native infrastructure provisioning and lifecycle management on AWS
  • Multi-environment deployment pipelines (dev, staging, prod) with reproducible configurations
  • Security compliance auditing, drift detection, and automated cloud teardowns
  • Teams managing AWS alongside SaaS providers (Cloudflare, Datadog, GitHub) with one IaC tool
Not ideal for
  • Per-commit application deploys

Overview

Terraform with Amazon Web Services (AWS) is a widely used pairing for declarative Infrastructure as Code (IaC). Utilizing HashiCorp Configuration Language (HCL) and the official AWS provider, it automates the provisioning, lifecycle management, and version control of cloud topologies from VPC networks to Kubernetes clusters. State usually lives in S3, and the same configuration can run on OpenTofu, the open-source fork created after Terraform's 2023 licence change.

What's inside

HCL syntax is clean and easy to learn; complexity arises from understanding underlying AWS networking (VPCs, subnets, route tables, IAM policies).

  • Terraform

    Terraform

    Infrastructure

    Hosts, deploys or connects the system

    Learning: Easy

    Status: Active

  • AWS

    AWS

    Infrastructure

    Hosts, deploys or connects the system

    Learning: Moderate

    Status: Active

How it works

Engineers declare target cloud state in HCL configuration files. Terraform CLI builds a resource dependency DAG, compares the planned changes against the remote state file in S3 (locked with S3's native lockfile, or a DynamoDB table in older setups), and calls AWS APIs to provision infrastructure.

  1. 1.

    Infrastructure to infrastructure

    Terraform evaluates HCL configuration files and calculates resource execution graphs with dry-run plan generation.

  2. 2.

    Infrastructure to infrastructure

    Terraform acquires a state lock (an S3 lockfile with `use_lockfile`, or a DynamoDB item in older setups) and reads the remote state snapshot from Amazon S3.

  3. 3.

    Infrastructure to infrastructure

    Terraform AWS Provider issues authenticated SigV4 REST API calls to AWS endpoints (VPC, EKS, RDS, S3, IAM) to apply changes.

  4. 4.

    Infrastructure to infrastructure

    Terraform waits for each resource to reach a ready state, writes the updated state back to S3 (versioned for recovery) and releases the lock; failed resources are marked tainted for the next run.

Strengths and drawbacks

Strengths

  • Declarative state & plan verification

    `terraform plan` provides deterministic insight into exactly what cloud resources will be created, modified, or destroyed before making live API calls.

  • Massive AWS provider coverage

    The official HashiCorp AWS provider supports thousands of AWS resources, IAM permissions, and networking topologies with active upstream maintenance.

  • Multi-account by design

    Provider aliases with `assume_role` let one configuration manage resources across many AWS accounts and regions, matching AWS Organizations' account-per-environment pattern.

  • Mature community modules

    The terraform-aws-modules collection provides widely used, well-documented modules for VPC, EKS, RDS, IAM and more, so teams rarely start networking or cluster code from scratch.

Drawbacks

  • State file synchronization & drift

    Manual changes made via the AWS Console cause out-of-band drift that must be reconciled with `terraform apply -refresh-only`, import blocks, or by reverting the change.

  • Large states slow down and widen blast radius

    A single state with thousands of resources makes every plan refresh hit AWS APIs heavily, runs into API throttling and puts unrelated systems in one apply; split state by account, environment and component.

  • IAM eventual consistency

    Newly created IAM roles and policies are not always usable immediately, causing intermittent failures when creating Lambda functions, EKS node groups or cross-account resources that pass on retry.

  • Licence and tool choice

    Terraform has been under the Business Source License since 2023 and OpenTofu is the MPL-licensed fork; most configurations run on both, but newer features diverge, so pick one per codebase and pin its version.

Scores

Editorial ratings out of 10, comparable across every stack in the guide. They are judgement, not benchmarks. How we score

Speed of building
7.4 out of 10, catalog average 7.7

How quickly a team ships features

Ease of learning
7.2 out of 10, catalog average 7.2

Higher means easier to pick up

Scalability
9.0 out of 10, catalog average 7.6

How far it grows before a redesign

Performance
8.0 out of 10, catalog average 7.5

Speed of the running application

Maintainability
8.0 out of 10, catalog average 7.2

How well the codebase ages

Ecosystem
9.5 out of 10, catalog average 8.2

Libraries, hosting, docs and hiring

Flexibility
8.4 out of 10, catalog average 7.4

How many kinds of product it suits

How it scales

Scales from single VPC setups up to enterprise multi-account AWS Organizations managed via Terraform Cloud / Spacelift / Atlantis.

Starting outMVP and first users
Single repository managing core VPC, RDS, and ECS resources using local/S3 backend state.
GrowingReal traffic, a few engineers
Modular Terraform structure separated by environment (dev/prod) with S3 remote state and DynamoDB state locking.
LargeHeavy traffic or data
Automated GitOps CI/CD with Atlantis or Terraform Cloud, automated plan PR comments, and OPA/Sentinel policy checks.
EnterpriseMany teams and regions
Multi-account AWS Landing Zone architecture using Terraform modules, Terragrunt orchestration, and automated drift remediation.

Where it fits

Common projects, from best fit to worst.

  • Automated production VPC & EKS cluster provisioning

    Provisions repeatable multi-AZ VPC subnets, NAT gateways, security groups, and managed Kubernetes clusters in minutes.

    Great fit

  • Multi-account AWS organizations baseline

    Account-level guardrails (CloudTrail, Config, IAM Identity Center assignments, SCPs and shared networking) applied consistently to every new account.

    Great fit

  • Per-commit application deploys

    Pushing new ECS task definitions or Lambda code on every commit is smoother with CodeDeploy, CI deploy actions or GitOps; Terraform otherwise fights the deploy tool over image tags.

    Poor fit

Alternatives

Similar stacks, and when you would choose them instead.

Sources

Reviewed on November 19, 2026 against the documentation below. Found something out of date? Suggest a correction. Read our methodology.

Stacks that share technologies with Terraform + AWS.