Delete all s3 buckets under profile

aws s3

Test before actually deleting. This removes all buckets. F up your account at your own risk. This might take a while.

To delete all buckets under a specific s3 profile run...

aws s3 ls --profile something | cut -d" " -f 3 | xa | cut -d" " -f 3 | xargs -I{} aws s3 rb --profile something s3://{} --force

From: https://github.com/aws/aws-cli/issues/2471

© 2024 Code0x378