Skip to main content

Resource Locking Explained

Stax regularly carries out complex, long-running, asynchronous processes that maintain account resources. The processes behind Stax Assurance are a good example of this, as are modifications to Stax-managed AWS accounts requested by end users via the Console, API, or SDK.

To prevent accounts entering a conflicting state by the actions of these processes, Stax has safeguards in place to eliminate the possibility of unintended and conflicting state changes.

If you attempt to apply a state change to an account that is already in the process of being modified by another task, the Stax API will respond accordingly with a HTTP 409 Conflict error code, including an error message that identifies the blocking task. An example of this is when attempting to close an account that is in the process of being renamed.

{
"Error": "This resource cannot be modified because it is locked by another task. You can monitor the process of the task at: GET https://api.us1.staxapp.cloud/20190206/task/7b95f3dc-dcdb-4ae2-8187-7fa4cdd60168"
}

Use the Fetch status of Task endpoint of the Stax API to monitor the progress of the blocking task. Once the blocking task has completed, please retry your account related operation.

Stax only supports resource locking on Stax-managed AWS accounts at this time. In future, this may change to support other resource types as well.