Terraform's S3 backend no longer needs a DynamoDB table
The S3 backend has supported native locking since Terraform 1.10 — set use_lockfile = true
and it writes a .tflock object alongside the state file, using S3’s conditional writes
instead of a separate lock table.
terraform {
backend "s3" {
bucket = "my-state-bucket"
key = "project/terraform.tfstate"
region = "us-east-1"
encrypt = true
use_lockfile = true
}
}
The dynamodb_table argument still works but is deprecated. Worth knowing mostly because
every bootstrap guide written before late 2024 tells you to create a table first, and
that’s now a resource you can skip.