In the digital era, cloud computing plays a significant role in scalable resource sharing to carry out seamless computing and information sharing. Securing the data, resources, applications and infrastructure of the cloud is a challenging task among the researchers. To secure the cloud, cloud security controls are deployed in the cloud computing environment. The cloud security controls are roughly classified as deterrent controls, preventive controls, detective controls and corrective controls. Among these, detective controls are significantly contributing for cloud security by detecting the possible intrusions to prevent the cloud environment from the possible attacks. This detective control mechanism is established using intrusion detection system (IDS). The detecting accuracy of the IDS greatly depends on the network traffic data that is employed to develop the IDS using machine-learning algorithm. Hence, this paper proposed a cuckoo optimisation-based method to preprocess the network traffic data for improving the detection accuracy of the IDS for cloud security. The performance of the proposed algorithm is compared with the existing algorithms, and it is identified that the proposed algorithm performs better than the other algorithms compared.