An earthquake early-warning system (EEWS) is an indispensable tool for mitigating loss of life caused by earthquakes. The ability to rapidly assess the severity of an earthquake is crucial for effectively managing earthquake disasters and implementing successful risk-reduction strategies. In this regard, the utilization of an Internet of Things (IoT) network enables the real-time transmission of on-site intensity measurements. This paper introduces a novel approach based on machine-learning (ML) techniques to accurately and promptly determine earthquake intensity by analyzing the seismic activity 2 s after the onset of the p-wave. The proposed model, referred to as 2S1C1S, leverages data from a single station and a single component to evaluate earthquake intensity. The dataset employed in this study, named “INSTANCE,” comprises data from the Italian National Seismic Network (INSN) via hundreds of stations. The model has been trained on a substantial dataset of 50,000 instances, which corresponds to 150,000 seismic windows of 2 s each, encompassing 3C. By effectively capturing key features from the waveform traces, the proposed model provides a reliable estimation of earthquake intensity, achieving an impressive accuracy rate of 99.05% in forecasting based on any single component from the 3C. The 2S1C1S model can be seamlessly integrated into a centralized IoT system, enabling the swift transmission of alerts to the relevant authorities for prompt response and action. Additionally, a comprehensive comparison is conducted between the results obtained from the 2S1C1S method and those derived from the conventional manual solution method, which is considered the benchmark. The experimental results demonstrate that the proposed 2S1C1S model, employing extreme gradient boosting (XGB), surpasses several ML benchmarks in accurately determining earthquake intensity, thus highlighting the effectiveness of this methodology for earthquake early-warning systems (EEWSs).