How do I delete a versioned bucket in AWS S3 using the CLI?

前端 未结 20 1009
我在风中等你
我在风中等你 2020-12-07 16:34

I have tried both s3cmd:

$ s3cmd -r -f -v del s3://my-versioned-bucket/

And the AWS CLI:

$ aws s3 rm s3://my-v         


        
20条回答
  •  北荒
    北荒 (楼主)
    2020-12-07 16:49

    This bash script found here: https://gist.github.com/weavenet/f40b09847ac17dd99d16

    worked as is for me.

    I saved script as: delete_all_versions.sh and then simply ran:

    ./delete_all_versions.sh my_foobar_bucket

    and that worked without a flaw.

    Did not need python or boto or anything.

提交回复
热议问题