These days, the Internet of Things applications are growing progressively. However, the existing frameworks for IoT applications are notsatisfied the security, allocation, and provisioning requirements.We propose a novel secure IoT application framework. Fog cloud execution model is serverless computing which is run by the server in cloud provider and the allocation of machine resources is dynamically managed. The application which consumes the actual amount of resources, the pricing is based upon that rather on pre-purchase units of capacity. The proposed framework consists of different methods, such as secure mobility, resource allocation, provisioning, and prediction under blockchain technologies.