Amazon S3 now supports conditional deletes in S3 general purpose buckets
Amazon S3 now supports conditional deletes in S3 general purpose buckets to evaluate if the object is unchanged before deleting it. This capability helps you improve data durability, consistency, and reduce errors from accidental deletions in high-concurrency, multiple-writer scenarios.
Conditional writes simplify how distributed applications with multiple clients concurrently update shared datasets. Now, clients can perform conditional deletes using the HTTP if-match header with the ETag value. Amazon S3 then evaluates the precondition provided in the request and prevents your clients from deleting the object unless the precondition is satisfied. Additionally, you can use the s3:if-match condition key in your S3 bucket policies to enforce conditional delete operations. For example, you can always require clients to use the HTTP if-match header in both, S3 DeleteObject and S3 DeleteObjects API requests, helping you to minimize the risk of accidental deletion in your bucket.
Conditional deletes are available in S3 general purpose buckets at no additional cost in all Amazon Web Services Regions, 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 S3 API, SDKs, and CLI to perform conditional deletes. To learn more, visit the S3 User guide.