The rapid expansion of the Internet of Things (IoT) has introduced significant challenges to network security, particularly due to the resource-constrained nature of IoT devices. While numerous intrusion detection models have demonstrated high accuracy in identifying network threats, their substantial computational, memory, and power requirements render them unsuitable for IoT environments. Additionally, the disparity in performance across different datasets further complicates the accurate detection of cyber-attacks, as each dataset possesses unique characteristics, strengths, and limitations that influence the performance of IDS models. To address these limitations, this study presents a novel lightweight intrusion detection system (IDS) framework specifically designed for IoT devices. Our methodology involves combining multiple widely used intrusion detection datasets, such as UNSW, ToN-IoT, BoT-IoT, and CSE-CIC-IDS2018, into a comprehensive unified dataset. This approach allows us to use a universal feature set for training the models effectively. Leveraging few-shot learning techniques, we developed a model that achieves high accuracy of 100% on the combined dataset, utilizing less than 1% of the data for training. Furthermore, our framework demonstrated significant improvements in execution time, CPU usage, and memory utilization compared to traditional models. Specifically, our proposed model demonstrated a significant reduction in both time consumption and resource usage when utilizing 13 features compared to 43 features. The model achieved the lowest time consumption of 26.32 s with 43 features, while only taking 12.20 s with 13 features. Additionally, it recorded a CPU usage of 45.70% for 43 features, which decreased to 37.50% for 13 features. Memory usage also saw a reduction, dropping from 63.05 MB with 43 features to 49.79 MB with 13 features.