Data sources and computational applications share the resources from the cloud environment. Hardware, software and information are provided in cloud environment. Amazon and Elastic Cloud Computing (EC2) are the leading commercial cloud resource providers. Pricing schemes are used in commercial clouds. Resource provisioning contracts are designed with different time periods. The resource provider uses the Extended Optimal Cloud Resource Provisioning (E-OCRP) algorithm for resource optimization. The E-OCRP algorithm can provision computing resources for being used in multiple provisioning stages.