Maintained with ☕️ by
IcePanel logo

Amazon S3 adds conditional write functionality to copy operations

Share

Services

Amazon S3 expands conditional write functionality tocopy 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 the object’s content. 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 the condition against the specified object's key or ETag before executing the copy operation in the destination bucket. This eliminates the need for additional client-side coordination mechanisms or API validation requests. Conditional copy is available at no additional charge in all AWS Regions in both S3 general purpose and directory buckets. You can use the AWS SDK, API, or CLI to copy data conditionally to your buckets. To learn more about conditional operations, visit the [S3 User Guide](https://docs.aws.amazon.com/AmazonS3/latest/userguide/conditional-requests.html).