Delete Amazon S3 buckets? [closed]

2019-03-07 21:53发布

I've been interacting with Amazon S3 through S3Fox and I can't seem to delete my buckets. I select a bucket, hit delete, confirm the delete in a popup, and... nothing happens. Is there another tool that I should use?

23条回答
别忘想泡老子
2楼-- · 2019-03-07 22:31

It is finally possible to delete all the files in one go using the new Lifecycle (expiration) rules feature. You can even do it from the AWS console.

Simply right click on the bucket name in AWS console, select "Properties" and then in the row of tabs at the bottom of the page select "lifecycle" and "add rule". Create a lifecycle rule with the "Prefix" field set blank (blank means all files in the bucket, or you could set it to "a" to delete all files whose names begin with "a"). Set the "Days" field to "1". That's it. Done. Assuming the files are more than one day old they should all get deleted, then you can delete the bucket.

I only just tried this for the first time so I'm still waiting to see how quickly the files get deleted (it wasn't instant but presumably should happen within 24 hours) and whether I get billed for one delete command or 50 million delete commands... fingers crossed!

查看更多
不美不萌又怎样
3楼-- · 2019-03-07 22:32

recent versions of s3cmd have --recursive

e.g.,

~/$ s3cmd rb --recursive s3://bucketwithfiles

http://s3tools.org/kb/item5.htm

查看更多
孤傲高冷的网名
4楼-- · 2019-03-07 22:33

Try https://s3explorer.appspot.com/ to manage your S3 account.

查看更多
该账号已被封号
5楼-- · 2019-03-07 22:34

With s3cmd: Create a new empty directory s3cmd sync --delete-removed empty_directory s3://yourbucket

查看更多
女痞
6楼-- · 2019-03-07 22:35

Amazon recently added a new feature, "Multi-Object Delete", which allows up to 1,000 objects to be deleted at a time with a single API request. This should allow simplification of the process of deleting huge numbers of files from a bucket.

The documentation for the new feature is available here: http://docs.amazonwebservices.com/AmazonS3/latest/dev/DeletingMultipleObjects.html

查看更多
一纸荒年 Trace。
7楼-- · 2019-03-07 22:37

I'll have to have a look at some of these alternative file managers. I've used (and like) BucketExplorer, which you can get from - surprisingly - http://www.bucketexplorer.com/.

It's a 30 day free trial, then (currently) costing US$49.99 per licence (US$49.95 on the purchase cover page).

查看更多
登录 后发表回答