Rapid growth of Internet of Things (IoT) services with different service level agreement (SLA) requirements has called for offloading computing tasks from the resource constrained IoT devices to the remote cloud. The growing number of IoT devices is exacerbating the links between IoT devices and the cloud. Furthermore, many services (e.g., health and disaster response) require fast service response and immediate data analytics, thus posing a great challenge to the remote cloud. Fog computing provides the solution by bringing computing resources to the edge of the network to assume substantial computing tasks. However, the resource failures during service processing should not be overlooked because they can greatly degrade service performance. In our work, we investigate the fog resource provisioning problem for the deadline-driven IoT services to minimize the system cost considering the probability of resource failures. We formulate the problem as an integer linear programming (ILP) model, and then design a Weighted Best Fit Decreasing (WBFD) algorithm with low computational complexity. Simulation results validate that our proposed algorithm performs close to the optimal solutions of ILP.