Why are people going for this guys throat— distributed locking might be impossible but what is being described, distributed leasing, is totally possible and useful. There's no sins being committed here.
I might choose DynamoDB over S3 to implement this but both are fine.
That said, if you have a choice between implementing idempotency and using a distributed lock, you should always opt for the former. It’s far less complex and less error prone.
Telling people "here's a recipe to do locks" should come with a giant flashing sign that say: "this is not an actual lock (as in in-process locks) -- locks in distributed systems are impossible, this cannot be used as a recipe for mutual exclusion"
I might choose DynamoDB over S3 to implement this but both are fine.