Context: In cloud computing, lock-in refers to the difficulty of porting an application and/or data from one cloud platform to another. Current attempts to address this problem revolve around standardization of APIs and frameworks. We propose a different path, using model-driven engineering (MDE). Objective: Our goal is to build a repository of MDE transformations and use code generation to reduce the development effort for each platform, thus reducing repetitive programing tasks, increasing portability and minimizing lock-in side-effects. Method: To attain this objective, we developed an MDE approach to handle persistence for Google App Engine and Azure, and discuss how MDE can reconcile the differences between features of each platform persistence model. A controlled experiment has been performed to evaluate the proposal, in which subjects were asked to use two versions of the same application implemented using our MDE approach. Both versions, one for each platform, were generated from the same domain model. Results: According to the subjects, no differences in functionality were perceptible between the two versions. Indeed, applications were more easily ported between the two chosen cloud providers without noticeable differences in terms of persistence functionality. Conclusion: The main contribution of our work is to show that there is an alternative path to the standardization of cloud technologies. MDE can increase the portability of the applications by reducing the negative impacts of lock-in. A limitation of our approach, that is inherent to most MDE approaches, is that if the generated code needs to be adapted or modified, the MDE life-cycle can be broken. Changes in the generated code have to be replicated, either in the models or in the transformations, which is not a trivial task.