An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty

In this article, we will the solution for the belwo AWS S3 bucket error.

An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty

An error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty

Solution for n error occurred (BucketNotEmpty) when calling the DeleteBucket operation: The bucket you tried to delete is not empty

We have to empty the bucket recursivelly and then delete it using rb command.

aws s3 rm s3://bucket-name --recursive aws s3 rb s3://bucket-name --force

Examples:

aws s3 rm s3://r2admin12234 --recursive aws s3 rb s3://r2admin12234 --force

Leave a Reply

Your email address will not be published. Required fields are marked *