Machine learning (ML) provides effective solutions to develop efficient intrusion detection system (IDS) for various environments. In the present paper, a diversified study of various ensemble machine learning (ML) algorithms has been carried out to propose design of an effective and time-efficient IDS for Internet of Things (IoT) enabled environment. In this paper, data captured from network traffic and real-time sensors of the IoT-enabled smart environment has been analyzed to classify and predict various types of network attacks. The performance of Logistic Regression, Random Forest, Extreme Gradient Boosting, and Light Gradient Boosting Machine classifiers have been benchmarked using an open-source largely imbalanced dataset 'DS2OS' that consists of 'normal' and 'anomalous' network traffic. An intrusion detection model ''LGB-IDS'' has been proposed using the LGBM library of ML after validating its superiority over other algorithms using ensemble techniques and on the basis of majority voting. The performance of the proposed intrusion detection system is suitably validated using certain performance metrics of machine learning such as train and test accuracy, time efficiency, error-rate, true-positive rate (TPR), and false-negative rate (FNR). The experimental results reveal that XGB and LGBM have almost equal accuracy, but the time efficiency of LGBM is much better than RF, and XGB classifiers. The main objective of the present paper is to propose a design of an efficient intrusion detection model with high accuracy, better time efficiency, and reduced false alarm rate. The experimental results show that the proposed model achieves an accuracy of 99.92% and the time efficiency comes to be much higher than other prevalent algorithms-based models. The threat detection rate is greater than 90% and less than 100%. Time complexity of LGBM is also very much low as compared to other ML algorithms.INDEX TERMS Machine learning classification algorithms, ensemble classifiers, gradient boosting algorithms, light gradient boosting machines (LGBM), and intrusion detection systems (IDS).Open Access funding provided by 'Università degli Studi di Enna "KORE"' within the CRUI CARE Agreement