IoT applications are becoming widespread in monitoring and managing critical infrastructure. Many attacks have been demonstrated in the state-of-the-art on IoT resources. These attacks make use of vulnerabilities present in various connected systems and the Internet of Things (IoT). The state-of-the-art presents many approaches to detect and mitigate such attacks on IoT resources. The early attack detection mechanism is essential to prevent damage to the IoT system and human. This paper presents an algorithm for early detection of attacks on IoT resources through use of predictive descriptor tables. Effectiveness of the proposed algorithm is evaluated through experimental setup built using Google cloud platform. Experimental results show that the proposed algorithm is efficient in the detection of attacks in real-time.