The advent of emerging technologies such as 5G and Internet of Things (IoT) will generate a colossal amount of data that should be processed by the cloud computing. Thereby, cloud resources optimisation represents significant benefits in different levels: cost reduction for the user, saving energy consumed by cloud data centres, etc. Cloud resource optimisation is a very complex task due to its NP-hard characteristic. In this case, use of metaheuristic approaches is more rational. But the quality of metaheuristic solutions changes by changing the problem. In this paper we have dealt with the problem of determining the configuration of resources in order to minimise the payment cost and the duration of the scientific applications execution. For that, we proposed a mathematical model and three metaheuristic approaches, namely the Genetic Algorithm (GA), hybridisation of the Genetic Algorithm with Local Search (GA-LS) and the Simulated Annealing (SA). The comparison between them showed that the simulated annealing finds more optimal solutions than those proposed by the genetic algorithm and the GA-LS hybridisation.