Use the following CLI command to delete a folder from an S3 bucket:
$ aws s3 rm s3://bucket/folder --recursive
--recursive is useful when you need to delete all the subfolders as well.
For further understanding, refer to the AWS certification Course.