简体   繁体   English

删除 AWS S3 中的对象

[英]Delete an object in AWS S3

I'm trying to understand the delete operation of an object in aws S3.我试图了解 aws S3 中对象的删除操作。 In cross region replication, if I delete an object from the source, this delete is not propagated to the destination.在跨区域复制中,如果我从源中删除一个对象,则此删除不会传播到目标。

The official text - "If you specify an object version ID to delete in a DELETE request, Amazon S3 deletes that object version in the source bucket, but it doesn't replicate the deletion in the destination bucket. In other words, it doesn't delete the same object version from the destination bucket. This protects data from malicious deletions. "官方文本 - “如果您在 DELETE 请求中指定要删除的对象版本 ID,Amazon S3 会删除源存储桶中的该对象版本,但不会复制目标存储桶中的删除内容。换句话说,它不会t 从目标存储桶中删除相同的对象版本。这可以保护数据免受恶意删除。”

In other case, I read that在其他情况下,我读到

The official text - Amazon S3 offers eventual consistency for overwrite PUTS and DELETES in all Regions官方文本 - Amazon S3 为覆盖所有区域的 PUTS 和 DELETES 提供最终一致性

When I made a test, the delete is not propagated.当我进行测试时,删除不会传播。 Then, there is a divergence between the replica !那么,复制品之间就有了分歧!

Is it normal ?正常吗? how about the eventual consistency of the delete ?删除的最终一致性如何?

This is not about replication, it's about simple buckets from Introduction to AWS S3.这不是关于复制,而是关于 AWS S3 简介中的简单存储桶。

Amazon S3 offers eventual consistency for overwrite PUTS and DELETES in all Regions Amazon S3 为覆盖所有区域的 PUTS 和 DELETES 提供最终一致性

The right answer - "it doesn't delete the same object version from the destination bucket. This protects data from malicious deletions".正确答案 - “它不会从目标存储桶中删除相同的对象版本。这可以保护数据免受恶意删除”。

If you need "consistency of the delete" - you can try to automate it with aws s3 sync with --delete flag.如果您需要“删除的一致性” - 您可以尝试使用带有--delete标志的aws s3 sync来自动化它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM