The ONTAP S3 bucket needs to be empty before it can be deleted.
Delete the objects of the S3 bucket by the AWS CLI on the client side:
aws --endpoint-url http://ip/path_to_endpoint s3 rm s3://bucketname --recursiveaws --endpoint-url http://<strong>10.x.x.x</strong><span> </span>s3 rm s3://<strong>OntapS3bucket</strong> --recursiverm command, refer to the following: Objects in ONTAP S3 bucket not seen in S3 Browser