amazon-s3eventual-consistency

Amazon S3 consistency for versioning buckets


How does versioning work with Amazon S3 consistency? In my use case I want to upload multiple versions to the same bucket (with versioning enabled). Many writes may occur at the same time.

Will I get read-after-write-consistency, eventual consistency, no consistency or race condition (data being overwritten and lost) for concurrent updates (PUTS) to the same objects in same bucket?

The documentation about consistency https://docs.aws.amazon.com/AmazonS3/latest/dev/Introduction.html#ConsistencyModel has nothing about versioning.

The documentation about versioning https://docs.aws.amazon.com/AmazonS3/latest/dev/Versioning.html has nothing about consistency.


Solution

  • For concurrent writes in versioned buckets, it seems that you could get a 503 response for the oldest timestamp according to this other post.

    For concurrent writes in non-versioned buckets, from the docs:

    Amazon S3 does not support object locking for concurrent writers. If two PUT requests are simultaneously made to the same key, the request with the latest timestamp wins. If this is an issue, you must build an object-locking mechanism into your application.

    As per consistency on other scenarios, Amazon S3 team announced in December 2020 support for read-after-write consistency and it applies to versioned buckets as well.