Cloud computing, integral for data storage and online services, presents significant advantages over traditional data storage and distribution methods, including enhanced convenience, on-demand storage, scalability, and cost efficiency. Its growing adoption in securing Internet of Things (IoT) and cyber-physical systems (CPS) against various cyber threats offers numerous opportunities. Despite the continuous evolution of malware and the lack of a universally effective detection method, cloud environments provide a promising approach for malware detection. Cloud computing, recognized for its efficiency, scalability, flexibility, and reliability on elastic resources, is widely utilized in the IT industry to support IT infrastructure and services. However, one of the foremost security challenges faced is malware attacks. Certain antivirus scanners struggle to detect metamorphic or encrypted malware in cloud environments due to complexity and scale, allowing such threats to evade detection. High detection rates with precision in reducing false positives are essential. Machine learning (ML) classifiers, a vital component in Artificial Intelligence (AI) systems, require training on extensive data volumes to develop credible models with high detection rates. Traditional detection methods face challenges in identifying complex malware, as modern malware employs contemporary packaging and obfuscation techniques to circumvent security measures. This paper provides a detailed discussion on detecting malware in cloud environments and the advantages of cloud computing in safeguarding IoT and CPS from cyber attacks. It presents a survey on malware analysis and detection models, aiding researchers in identifying limitations of traditional malware detection models in cloud environments and inspiring the design of innovative models with enhanced quality of service levels.