Upstash
Distributed Lock SDK
A Redis-backed lock and debounce SDK for coordinating work across serverless clients.
Two serverless requests can arrive at the same time and both decide they should do the same work. That becomes a problem when the work is expensive, calls another service, or writes to a shared resource.

Image from Upstash launch post.
I built an open-source library called @upstash/lock around the atomic operations Redis already provides. A client acquires a key only if it does not exist, the key has a lease, and the release checks that the caller still owns the lock. The package also included debounce support.
Because Upstash Redis replicates asynchronously, this is a best-effort lock. It is useful for reducing duplicate work, but it does not provide a strict exactly-once guarantee.
Read the launch post for more details.