DynamoDB lock table not found (ResourceNotFoundException) Terraform Origin: Platform & cloud OSI layer 7 · Application Last updated 5 Nov 2026

Terraform: Error: Error acquiring the state lock: ResourceNotFoundException: Requested resource not found / failed to retrieve lock info

The S3 backend's dynamodb_table doesn't exist, so locking fails.

Exact message you may see Error acquiring the state lock: ResourceNotFoundException: Requested resource not foundError: Error acquiring the state lock ResourceNotFoundExceptionfailed to retrieve lock info: ResourceNotFoundExceptionError: Error releasing the state lock: ResourceNotFoundExceptionDynamoDB table does not exist state lock
Seen on: Terraform AWS

Meaning

Create the table with partition key LockID (String) in the same region as the backend, billing mode PAY_PER_REQUEST, or remove dynamodb_table if you don't use locking (newer Terraform supports use_lockfile = true for S3-native locking). Check table name/region/profile.

Common causes

  • Table never created
  • Wrong table name/region
  • Table deleted
  • Different AWS account/profile
  • Using DynamoDB-based locking after migrating to S3 native locks

⚡ Quick fix

  1. Create table: aws dynamodb create-table --table-name tf-lock --attribute-definitions AttributeName=LockID,AttributeType=S --key-schema AttributeName=LockID,KeyType=HASH --billing-mode PAY_PER_REQUEST
  2. Fix dynamodb_table/region
  3. Use use_lockfile = true on recent Terraform

Detailed fix by platform

AWS

  1. aws dynamodb describe-table --table-name tf-lock --region eu-west-1

How to diagnose

  1. Table — Exists?
  2. Key — LockID?
  3. Region — Same?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Platform & cloud. Errors that are often confused with or caused by this one (click to open):

Backend configuration changed (migrate or reconfigure) — Terraform: Error: Backend configuration changed — A change in the backend configuration has been detected, which may require migrating existing state (Terraform)Backend configuration…Backend initialization required — Terraform: Error: Backend initialization required, please run "terraform init" — Reason: Initial configuration of the requested backend "s3" (Terraform)Backend initializatio…Error acquiring the state lock — Terraform: Error: Error acquiring the state lock — ConditionalCheckFailedException / state blob is already locked (Terraform)Error acquiring the s…Error loading state: AccessDenied (S3 backend) — Terraform: Error: Failed to load state: AccessDenied: Access Denied / Error refreshing state: AccessDenied status code: 403 (Terraform)Error loading state: …Invalid AWS Region — Terraform: Error: Invalid AWS Region: us-east-3 / Error: configuring Terraform AWS Provider: validating provider credentials: operation error STS: GetCallerIdentity (Terraform)Invalid AWS RegionNo valid credential sources found (AWS provider) — Terraform: Error: No valid credential sources found — failed to refresh cached credentials, no EC2 IMDS role found / Error: configuring Terraform AWS Provider: no valid credential sources (Terraform)No valid credential s…S3 backend: NoSuchBucket / bucket does not exist — Terraform: Error: Failed to get existing workspaces: S3 bucket "my-tf-state" does not exist / NoSuchBucket: The specified bucket does not exist (Terraform)S3 backend: NoSuchBuc…DynamoDB …

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.