Cloud Vendor Lock-In and Digital Sovereignty: How to Build Portable Software
How to reduce cloud vendor lock-in: where lock-in comes from, what to make portable, data residency rules, exit plans and why multi-cloud alone doesn't fix it.
The short answer
You can't eliminate vendor dependency, but you can decide where it is acceptable and make sure you could move if you had to. Keep your data in open, exportable formats and under keys you control, put proprietary services behind interfaces in your code, use portable building blocks where they cost little (containers, standard databases, infrastructure as code, OpenTelemetry), check where data must be stored by law or contract, and write and test an exit plan. Running on several clouds is not, by itself, a solution.
This guide is for CTOs, CIOs and founders, particularly in regulated sectors and in markets with data residency rules such as India, the UAE, Saudi Arabia and the EU. It is not legal advice.
Where lock-in actually comes from
Lock-in is rarely a single decision. It builds up across several layers, and some are far harder to undo than others.
| Source | Example | How hard to move |
|---|---|---|
| Data and data gravity | Terabytes in a provider's storage and databases; egress charges to move them | Hard |
| Proprietary managed services | Provider-specific databases, queues, serverless functions, AI services | Medium to hard, depending on how widely they are used in the code |
| Identity and access | Roles, policies and service accounts written in one provider's model | Medium |
| Infrastructure definitions | Infrastructure code tied to one provider's resources | Medium: the tool may be portable, the resources aren't |
| Operations and observability | Dashboards, alerts and logs in provider-specific tools | Medium |
| AI models and APIs | Prompts, fine-tunes and features built around one model provider | Medium; see LLM cost optimisation for model routing |
| Contracts and commercial terms | Multi-year commitments, discounts tied to volume, licence terms | Varies; check notice periods and switching terms |
| Skills | A team that knows only one provider's tooling | Slow to change |
Why multi-cloud alone doesn't solve it
Spreading workloads across two or three clouds is often presented as the cure for lock-in. In practice each workload usually still depends on the services of the cloud it runs on, so you have two or three sets of lock-in instead of one, plus duplicated tooling, skills and networking costs. Multi-cloud makes sense for specific reasons: a customer or regulator requires it, a provider lacks a region you need, or one provider offers a capability the other doesn't. It is not a substitute for designing the important layers to be portable.
What to make portable, and what not to
Portability has a cost. Spend it where switching would otherwise be hardest or where the risk is highest.
| Layer | Portable choice | When proprietary is fine |
|---|---|---|
| Data | Open formats, regular full exports you have tested, documented schemas | Rarely; data portability is worth paying for |
| Encryption keys | Keys you control, or a key management approach you can move | Low-sensitivity data |
| Databases | PostgreSQL or MySQL, or managed services compatible with them | Specialised workloads where a managed service is clearly better, behind an interface |
| Compute | Containers; Kubernetes from a conformant distribution where its complexity is justified | Small event-driven tasks where serverless is far simpler |
| Infrastructure as code | Open tooling with modules separated per provider | Provider-specific modules are expected; keep them separate |
| Messaging and events | Standard protocols and event formats such as CloudEvents | Internal queues hidden behind your own interface |
| Observability | OpenTelemetry for collecting metrics, logs and traces | Dashboards, which are easy to rebuild |
| AI models | A model gateway or abstraction so providers can be swapped and compared | Prototypes and low-volume features |
Worth noting
Licences matter too. In 2023 HashiCorp moved Terraform and other tools from an open-source licence to the Business Source License, and the community fork OpenTofu continued under the open-source MPL 2.0 licence. Check the licence terms of the tools your portability plan relies on.
Portable building blocks
- Kubernetes: the Cloud Native Computing Foundation certifies conformant Kubernetes distributions, so workloads built on standard Kubernetes APIs can run on many providers' managed services. It is powerful but operationally demanding; see Kubernetes vs serverless vs virtual machines.
- Infrastructure as code: define environments in code so they can be recreated; see infrastructure as code.
- OpenTelemetry: a vendor-neutral standard for telemetry, now a graduated CNCF project, so you can change monitoring backends without re-instrumenting code.
- CloudEvents: a CNCF specification for describing events consistently across services and providers.
- Standard databases: PostgreSQL and MySQL run everywhere, from managed cloud services to your own servers.
- Your own interfaces: wrapping provider SDKs (storage, queues, email, AI) behind small internal interfaces is the cheapest portability measure of all.
Data residency and sovereignty requirements
Sovereignty requirements differ by country and sector, and they often decide where data and systems can run before portability is even discussed. Examples, checked in November 2026:
| Market | Example requirement |
|---|---|
| India | RBI requires payment system data to be stored only in India; processing abroad is allowed only if the data is brought back and deleted abroad within a day. The DPDP Act allows the government to restrict personal data transfers to notified countries, with stricter sector rules continuing to apply; its transfer provisions take effect in 2027 under the DPDP Rules. |
| UAE | Health data relating to health services provided in the UAE must by default be stored and processed in the country, with limited exceptions set by ministerial resolution. |
| Saudi Arabia | The Personal Data Protection Law's transfer regulation permits transfers outside the Kingdom to adequate countries or with safeguards such as standard contractual clauses, with risk assessments required in some cases. |
| European Union | The GDPR governs international transfers of personal data, and the EU Data Act (applicable since September 2025) requires cloud providers to support customers switching, with switching charges abolished from 12 January 2027. |
Sovereign cloud options
The large providers now offer options aimed at sovereignty requirements, particularly in Europe. AWS opened its European Sovereign Cloud, a separate partition with its first region in Germany, in January 2026. Microsoft completed its EU Data Boundary for its main cloud services in February 2025. Google Cloud offers tiers ranging from data boundaries in its public cloud to partner-operated and air-gapped options. In India and the Gulf, the major providers operate in-country regions, and local providers also offer in-country hosting.
These options address where data is stored and who operates the infrastructure. They don't, on their own, address portability: an application built on one provider's sovereign cloud is still built on that provider's services.
Write an exit plan before you need it
The most practical protection against lock-in is a documented, tested exit plan for each critical system. It should cover:
- Inventory: every provider service the system uses, with the equivalent elsewhere and the effort to replace it
- Data export: how each data store is exported, in what format, how long it takes, and the last time it was tested
- Keys and secrets: how encryption keys and credentials move without exposing data
- Contract terms: notice periods, minimum commitments, data retrieval periods and switching charges
- Target environment: a realistic alternative (another cloud, a regional provider or your own infrastructure)
- Order of migration and rollback: which systems move first, and how to fall back
- Test: restore a full backup into a different environment at least once a year
Concerned about cloud dependency or data residency?
ZSpace Labs designs cloud application architectures that balance managed services with portability, and helps modernise systems so data and workloads can move when they need to.
Trade-offs to accept
Portability is insurance, and insurance costs money. Avoiding managed services entirely means running more yourself: patching, scaling, backups and on-call. Abstracting every provider feature slows development and hides useful capabilities. The right balance for most businesses is to keep data, keys and core business logic portable, use managed services freely where they are commodity or easy to replace, and document the rest.
Common mistakes
- Assuming multi-cloud equals no lock-in
- Never testing a full data export and restore elsewhere
- Writing business logic directly against provider SDKs throughout the codebase
- Ignoring egress costs and contract notice periods until a move is planned
- Treating sovereign hosting as the same thing as portability
- Over-engineering portability for systems that would be cheap to rebuild
Conclusion
Reducing lock-in is about knowing your dependencies and keeping the expensive ones under control: data, keys, identity and core logic. Use portable building blocks where they're cheap, use managed services deliberately, check residency rules for your markets, and test an exit plan. For data residency questions to settle before expanding into new markets, see data residency questions.
Planning a portable architecture?
Tell us about your current cloud setup, markets and compliance requirements. ZSpace Labs will help you decide what to make portable first. Discuss your cloud architecture.
Common questions.
Dependence on one provider's services, data formats, pricing or contracts that makes moving away slow, expensive or risky. It comes from proprietary managed services, data gravity and egress costs, provider-specific identity and networking, skills, and contract terms, not just from where the servers run.
No. Running across several clouds can add complexity and cost, and each application often ends up tied to the services of whichever cloud it runs on. Portability comes from deliberate choices about the layers that matter most (data, identity, deployment and observability) and from a tested exit plan, whichever number of providers you use.
The ability of an organisation, or a country, to keep control over its data, systems and technology choices: where data is stored and processed, who can access it, which laws apply, and whether it can switch suppliers. For a business it usually means data residency, control of encryption keys, clear operator access, and a realistic way to move providers.
Since 12 September 2025, providers offering cloud and other data processing services to customers in the EU must support switching, with contract terms that include a maximum two-month notice period and, normally, a transition period of up to 30 days. Providers can currently charge only reduced switching charges limited to their direct costs, and from 12 January 2027 they may not charge switching fees, including data egress for switching. Take legal advice on how it applies to your contracts.
Not usually. Managed services save significant operational work. Use them deliberately: prefer services built on open standards or compatible with open-source equivalents (for example PostgreSQL-compatible databases or Kubernetes), keep proprietary services behind clear interfaces in your code, and know what replacing each one would involve.