Clear abstraction anyone? We make it mandatory to separate the Managed service code to separate interfaces and implementation. We have the same code running both on Azure and AWS each leveraging their respective managed services. Just implement the interfaces for your need. It's not difficult.