amazon-s3amazon-dynamodb

Is there optimistic locking in AWS S3?


I have an excel file within s3. Since different programs read and write it, I need to guarantee that each of them is writing to the version they read.


Solution

  • Since 2020, AWS is strongly consistent and you can use standard HTTP header If-Match to implement optimistic locking.

    https://aws.amazon.com/es/blogs/aws/amazon-s3-update-strong-read-after-write-consistency/

    Since November 2024 the if-match header is also supported on the PutObject operation.