Amazon S3 adds conditional write functionality to copy operations
Amazon S3 expands conditional write functionality to copy operations. With conditional copy, you can now verify if the object exists or has been modified in your destination S3 bucket before copying it. This helps you coordinate simultaneous writes to the same object and prevents multiple concurrent writers from unintentionally overwriting the object.
You can now perform conditional copy operations through S3 CopyObject by including either the HTTP if-none-match header to verify object existence or the HTTP if-match header with ETag to validate object contents. Additionally, you can use the s3:if-match and s3:if-none-match condition keys in your S3 bucket policies to enforce conditional copy operations. S3 then evaluates these conditions against the specified object's key or ETag before executing the copy operation in the destination bucket. This eliminates your need for additional client-side coordination mechanisms or API validation requests.
Conditional copy is available at no additional charge in all Amazon Web Services Regions in both S3 general purpose and directory buckets, including Amazon Web Services China (Beijing) region, operated by Sinnet, and Amazon Web Services China (Ningxia) region, operated by NWCD.. You can use the Amazon SDK, API, or CLI to copy data conditionally to your buckets. To learn more about conditional operations, visit the S3 User Guide.