Huge collections of data have been created in recent years. Cloud computing provides a way to enable massive amounts of data to work together as data-intensive services. Considering Big Data and the cloud together, which is a practical and economical way to deal with Big Data, will accelerate the availability and acceptability of analysis of the data. Providing an efficient mechanism for optimized data-intensive services will become critical to meet the expected growth in demand. Because the competition is an extremely important factor in the marketplace, the cost model for data-intensive service provision is the key to provide a sustainable service market. As data play the dominant role in execution of data-intensive service composition, the cost and access response time of data sets influence the quality of the service that requires the data sets. In this paper, a data replica selection optimization algorithm based on an ant colony system is proposed. The performance of the data replica selection algorithm is evaluated by simulations. The background application of the work is the Alpha Magnetic Spectrometer experiment, which involves large amounts of data being transferred, organized and stored. It is critical and challenging to be cost and time aware to manage the data and services in this intensive research environment.