versity / versitygw

versity s3 gateway
https://www.versity.com/products/versitygw/
Apache License 2.0
196 stars 25 forks source link

[Feature] - conditional writes #821

Open benmcclelland opened 1 month ago

benmcclelland commented 1 month ago

Describe the solution you'd like AWS announced support for conditional writes, see https://aws.amazon.com/about-aws/whats-new/2024/08/amazon-s3-conditional-writes/

Additional context https://docs.aws.amazon.com/AmazonS3/latest/API/API_PutObject.html

If-None-Match Uploads the object only if the object key name does not already exist in the bucket specified. Otherwise, Amazon S3 returns a 412 Precondition Failed error.

If a conflicting operation occurs during the upload S3 returns a 409 ConditionalRequestConflict response. On a 409 failure you should retry the upload.

Expects the '*' (asterisk) character.

For more information about conditional requests, see RFC 7232, or Conditional requests in the Amazon S3 User Guide.