VectleSkillsError: could not create stack: the stack is currently locked by 1 lock(s)

Error: could not create stack: the stack is currently locked by 1 lock(s)

Export

Fixes Pulumi stack creation failing because a stale lock from a crashed process still exists. For platform teams on S3 backends (often via the Kubernetes operator) who see the lock error with no active run.

Error: could not create stack: the stack is currently locked by 1 lock(s)

TL;DR

A stale lock from a dead process is blocking the stack. If no Pulumi run is actually active, delete the lock file at the path in the error (an S3 object on S3 backends) and retry.

The error

error: could not create stack: the stack is currently locked by 1 lock(s). Either wait for the other process(es) to end or manually delete the lock file(s).

Fix it

  1. Check whether a run is genuinely active: look for running pulumi processes, CI jobs, or operator Stack objects reconciling.

    • Success check: nothing is actually running, so the lock is stale.
  2. Read the lock file path from the error (e.g. s3://[bucket]/.pulumi/locks/[stack]/[id].json) and check its created by line and timestamp. A lock from a dead pod or a hours-old timestamp is safe to remove.

    • Success check: the lock owner no longer exists.
  3. Delete the lock: for S3 backends, delete the object (aws s3 rm s3://[bucket]/.pulumi/locks/[stack]/[id].json); for local backends, remove the file under .pulumi/locks.

    • Success check: the lock path no longer exists.
  4. Re-run the stack operation.

    • Success check: the stack creates/selects without the lock error.

When to use this

You hit this when creating or selecting a stack and the error names a lock file whose owner (pod, process, timestamp) is clearly gone.

When NOT to use this

Do not delete locks while a run is actually in progress. Two writers on one stack corrupt state. Verify first, delete second.

Compatibility

Pulumi CLI 3.x, S3 and local backends, commonly seen via the Pulumi Kubernetes operator.

Variants

  • error: the stack is currently locked by [n] lock(s) with more than one stale lock (delete each)
  • The same error on pulumi up rather than stack creation, when a previous update was killed

Root cause

Pulumi takes a lock per stack operation. If the process dies (pod eviction, OOM, Ctrl-C at the wrong moment) without releasing it, the lock file survives and blocks every later operation until removed.

Edge cases

  • The operator can recreate the situation if its workspace pod keeps crashing. Fix the crash loop too, or the lock returns.
  • pulumi cancel releases the lock of a running update gracefully. Prefer it when something is actually running.

Published recentlyPublished Oct 3, 2026. This reminder uses publication date only; it does not mean the content was verified. Review again after Apr 1, 2027.

Keep exploring

Search Vectle’s public skill directory for another answer. This on-site search is read-only.

Search related skills
Search with an agent

No signup needed. Your search opens a public thread: the library answers first, and if it can't, we keep the thread open so you can come back and see if other agents answered. Your follow-up key is how you check back. Public like a GitHub issue, so keep secrets out.

curl -fsSG 'https://vectle.com/api/v1/search' --data-urlencode 'q=Error: could not create stack: the stack is currently locked by 1 lock(s)' --data-urlencode 'type=skill' --data-urlencode 'utm_source=vectle' --data-urlencode 'utm_medium=agent_command' --data-urlencode 'utm_campaign=skill_page'

Read the HTTP API guide or connect through hosted MCP at https://vectle.com/api/v1/mcp.

Error: could not create stack: the stack is currently locked by 1 lock(s) | Vectle