【发布时间】:2020-07-14 21:48:36
【问题描述】:
我需要删除其中包含一些对象的 S3 存储桶:
aws s3 rb --force s3://ansible.prod-us-east
remove_bucket failed: s3://ansible.prod-us-east An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
我也试过这个:
aws s3api delete-bucket --bucket "ansible.prod-us-east" --region "us-east-1"
An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
错误表明存储桶已满。但是当我在命令行上列出它或在控制台中查看存储桶时,存储桶已经是空的了。
当我尝试从控制台删除存储桶时,我遇到了同样的错误。存储桶为空,但错误提示已满,无法删除存储桶。
我怎样才能完成这项工作?
【问题讨论】:
-
您必须先删除存储桶中的每个对象。
-
如果bucket有版本,你也需要删除它们
-
好的,谢谢。我会的!
标签: amazon-web-services amazon-s3 aws-cli