I'm trying to empty an S3 bucket using CLI.
I tried
aws s3 rm --recursivecommand which doesn't empty my bucket as it has versioned enabled.I tried
aws s3 rb --forcecommand to forcefully delete the bucket, which doesn't work as well. It throws this errorBucketNotEmpty: The bucket you tried to delete is not empty. You must delete all versions in the bucket.
I really need to get this done using CLI. Is there a way to do it. Please help. The end goal is to delete the bucket. Thanks in advance.