Skip to content
Web Development16 min read

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.

01

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.

02

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.

SourceExampleHow hard to move
Data and data gravityTerabytes in a provider's storage and databases; egress charges to move themHard
Proprietary managed servicesProvider-specific databases, queues, serverless functions, AI servicesMedium to hard, depending on how widely they are used in the code
Identity and accessRoles, policies and service accounts written in one provider's modelMedium
Infrastructure definitionsInfrastructure code tied to one provider's resourcesMedium: the tool may be portable, the resources aren't
Operations and observabilityDashboards, alerts and logs in provider-specific toolsMedium
AI models and APIsPrompts, fine-tunes and features built around one model providerMedium; see LLM cost optimisation for model routing
Contracts and commercial termsMulti-year commitments, discounts tied to volume, licence termsVaries; check notice periods and switching terms
SkillsA team that knows only one provider's toolingSlow to change
03

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.

04

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.

LayerPortable choiceWhen proprietary is fine
DataOpen formats, regular full exports you have tested, documented schemasRarely; data portability is worth paying for
Encryption keysKeys you control, or a key management approach you can moveLow-sensitivity data
DatabasesPostgreSQL or MySQL, or managed services compatible with themSpecialised workloads where a managed service is clearly better, behind an interface
ComputeContainers; Kubernetes from a conformant distribution where its complexity is justifiedSmall event-driven tasks where serverless is far simpler
Infrastructure as codeOpen tooling with modules separated per providerProvider-specific modules are expected; keep them separate
Messaging and eventsStandard protocols and event formats such as CloudEventsInternal queues hidden behind your own interface
ObservabilityOpenTelemetry for collecting metrics, logs and tracesDashboards, which are easy to rebuild
AI modelsA model gateway or abstraction so providers can be swapped and comparedPrototypes 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.

05

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.
06

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:

MarketExample requirement
IndiaRBI 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.
UAEHealth 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 ArabiaThe 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 UnionThe 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.
07

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.

08

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.

Start a Project
09

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.

10

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
11

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.

Start a Project
FAQ

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.

Get in touch

Have a project in mind?

Whether you're building a new digital product, improving an existing website, or looking to automate part of your business — let's talk.