WebDAV includes an extension to HTTP to include the `LOCK` and `UNLOCK` verbs, these allow a client to perform a lock on a URL asset before performing some work, then unlocking the asset when they've completed.
The method is described in [RFC 4918](https://datatracker.ietf.org/doc/html/rfc4918#section-6) and I found out about it from [[OpenTofu]]'s documentation [on the http remote store](https://opentofu.org/docs/language/settings/backends/http). It could be fun to make some sort of basic storage API and share it. It could be a wrapper around S3 or some other key:value store but support those extra verbs. In order to use [[S3]] users have to have [[DynamoDB]] for complete state locking support.