Tests are what you need to invest in. When you test all of you business use cases in an abstract (perhaps even no-code) way, you are truly independent. You can rewrite the system very quickly, if you had a test-suite that allows for quick iteration (TDD style) and does not depend on implementation details.
Given just the code? Well good luck migrating to another cloud vendor. You will probably introduce one million bugs on the way.
Good luck with that. lol.
- The only stable APIs I've seen, if an API exists, are production financial APIs, because money is involved.
- DynDNS has been knows to change input and output parameter types, breaking calls
- Even Twilio has changed a fundamental API path (!) in the past couple of years, breaking SMS API calls in 2019
- Facebook only supports API version N and N-1. Hope you're not on N-2 and there's a sudden version bump!
(I say production APIs, since even payment gateways often have flaky dev/qa gateways that you can't reliably do automated tests against. Past companies that I worked at had to test against prod gateways with their own personal credit cards.)
Otherwise, if you want an API, ensure you choose a product/partner that offers/supports one.