You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 12, 2026. It is now read-only.
Amazon S3 now supports conditional writes (blog post). Docs indicate that s3:PutObject and s3:CompleteMultipartUpload now support the request header If-None-Match: *, in which case S3 will:
return a 200 if it created the object did not exist and was created as requested,
return a 412 Precondition Failed if the object already exists, or
return a 409 Conflict if the object is deleted before creation completes
S3 expanded conditional writes to include compare-and-swap (blog post). Docs describe both conditionals together. Conditional overwrites are implemented by If-Match: <expected ETag>, e.g. on s3:PutObject.
Reacted by Raphael-Dtonic, Matthew Swogger May, ryuseongryong, Rik Schreurs and Zach Griffith
Just would like to confirm. The ticket is open. So CEPH doesn't support conditional put via S3 API?
Let me know if CEPH support conditional put in other form/mechanism.
This functionality isn't quite tested here. There's no If-None-Match: test of any kind, and while there is an If-Match: test exercising conditional writes, it's annotated with @pytest.mark.fails_on_aws. I opened this issue to point out that S3's upstream behavior has changed.
PRs #663, #673, #682 will add relevant test coverage, though I haven't reviewed them closely enough to decide whether coverage is total relative to S3.
Activity
willglynn commentedon Nov 26, 2024
S3 expanded conditional writes to include compare-and-swap (blog post). Docs describe both conditionals together. Conditional overwrites are implemented by
If-Match: <expected ETag>, e.g. ons3:PutObject.chailuecha commentedon Jul 3, 2025
Just would like to confirm. The ticket is open. So CEPH doesn't support conditional put via S3 API?
Let me know if CEPH support conditional put in other form/mechanism.
willglynn commentedon Jul 3, 2025
Ceph supports conditional puts via
If-Match:andIf-None-Match:: https://tracker.ceph.com/issues/8562This functionality isn't quite tested here. There's no
If-None-Match:test of any kind, and while there is anIf-Match:test exercising conditional writes, it's annotated with@pytest.mark.fails_on_aws. I opened this issue to point out that S3's upstream behavior has changed.chailuecha commentedon Jul 5, 2025
Thanks a ton for the explanation. I tried header
f-None-Matchwith aws-sdk-1.11 (yep, its very old) to my CEPH installation. It works great.willglynn commentedon Sep 5, 2025
PRs #663, #673, #682 will add relevant test coverage, though I haven't reviewed them closely enough to decide whether coverage is total relative to S3.
scheuref commentedon Nov 24, 2025
So Ceph RGW S3 is supporting the request headers
If-MatchandIf-None-MatchforGetObject(cf. https://docs.ceph.com/en/latest/radosgw/s3/objectops/#get-object)
and apparently also for
PutObject(but this is missing in documentation),unsure if
CompleteMultipartUploadandCopyObjectalso supports it.And Ceph also supports the request headers
x-amz-copy-if-matchandx-amz-copy-if-none-matchforCopyObject(cf. https://docs.ceph.com/en/latest/radosgw/s3/objectops/#copy-object).
AFAIK none of these headers can be enforced in the bucket policy.
In contrast, AWS S3 supports
If-MatchandIf-None-Matchfor the following operations:PutObject,CompleteMultipartUploadandCopyObject(cf. https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes.html#conditional-write-key-names).
AWS also supports advanced bucket policy conditions for enforcing these headers, such as:
"Condition": {"Null": {"s3:if-none-match": "false"}, "StringEquals": {"s3:if-none-match": "*"} }"Condition": {"Bool": {"s3:ObjectCreationOperation": "false"} }These can be very useful for preventing overwrites and achieving immutability (similar to WORM buckets).
(cf. https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-writes-enforce.html#conditional-writes-enforce-ex1).
It would be great if Ceph could achieve the same.