Overview
Conditional writes extend the precondition support introduced with RenameObject in January 2026 toPutObject, CompleteMultipartUpload, and CopyObject. Attach preconditions to these requests to make writes atomic and prevent accidental overwrites. The operation succeeds only if the precondition is met; otherwise the server returns a 412 Precondition Failed error and the object is not modified.
Two headers are supported:
Use cases
Constraints
If-None-Matchonly accepts the value*. Passing an ETag value returns400 InvalidRequest.- If two concurrent requests use
If-None-Match: *for the same key, one succeeds and the other returns409 ConditionalRequestConflict. Retry on 409.
Learn more
- See the guide for using conditional requests for AWS CLI and Boto3 examples
- See the API reference for Conditional writes and S3 PutObject for more information
- See RenameObject (January 30, 2026) for the same precondition pattern with additional source, destination, and time-based conditions