In order to overcome the bottlenecks of traditional network manufacturing, a new service-oriented networked manufacturing model, i.e. the cloud manufacturing (CMfg), was proposed recently. As an effective method for the realization of the added value of manufacturing resource, resource service composition (RSC) plays an important role in the implementation of CMfg. In view of the issue of dynamic changes occurred during RSC in CMfg, this paper presents the concept of flexibility of RSC as well as the idea of optimal-selection of RSC based on flexibility, which can enable RSC to have the ability to adapt to the dynamic changes. Meantime, the measurement method of flexibility of RSC is investigated. The optimal-selection of RSC based on flexibility can be achieved through quantitative evaluation of flexibility.