Summary
local-s3 currently does not support S3 conditional writes. A repo-wide search for If-Match / if-match returns zero hits — neither PutObject, CopyObject nor CompleteMultipartUpload evaluate conditional headers.
Why
AWS GA'd conditional writes in Nov 2024. SDKs may send If-None-Match: * by default in some flows, so clients can silently hit unexpected behaviour against local-s3.
Reference: how competitors handle it
adobe/S3Mock has shipped this and hit multiple follow-up bugs — a signal that the feature is in real demand and that the edge cases are non-trivial:
Source: adobe/S3Mock two-year issue backfill (see state/findings.json, entry backfill-s3mock-2y).
Scope
- Operations: PutObject, CopyObject, CompleteMultipartUpload (and consider DeleteObject)
- Expected status codes:
412 PreconditionFailed, 409 ConditionalRequestConflict
- Watch out for ETag quoting semantics — S3 returns quoted ETags, comparisons must account for that (see S3Mock#2665)
Acceptance
- Conditional headers evaluated on the operations above
- Correct error codes returned on failed preconditions
- Integration tests covering match / no-match for each operation
Summary
local-s3 currently does not support S3 conditional writes. A repo-wide search for
If-Match/if-matchreturns zero hits — neitherPutObject,CopyObjectnorCompleteMultipartUploadevaluate conditional headers.Why
AWS GA'd conditional writes in Nov 2024. SDKs may send
If-None-Match: *by default in some flows, so clients can silently hit unexpected behaviour against local-s3.Reference: how competitors handle it
adobe/S3Mockhas shipped this and hit multiple follow-up bugs — a signal that the feature is in real demand and that the edge cases are non-trivial:Source: adobe/S3Mock two-year issue backfill (see
state/findings.json, entrybackfill-s3mock-2y).Scope
412 PreconditionFailed,409 ConditionalRequestConflictAcceptance