Build Serverless Apps That Run on Any Cloud
TL;DR: A new architectural approach uses Clean Architecture to make serverless applications portable. This lets developers write business logic once and deploy it across multiple clouds like AWS and Azure, avoiding expensive vendor lock-in.
Key facts
- Category
- Infrastructure
- Impact
- Medium
- Published
- Source
- InfoQ
Full summary
A new architectural pattern helps developers build serverless applications that can run on any cloud platform, from AWS to Azure.
A presentation reported by InfoQ details a practical strategy for a challenge facing many technology leaders: serverless vendor lock-in. Speaker Elena van Engelen outlined an architectural approach that allows companies to build serverless applications with core business logic that is completely independent of the underlying cloud provider. This portability enables a single codebase to be deployed across different environments, such as Amazon Web Services (AWS) and Microsoft Azure, without significant rewrites. The central concept is to structure the application in a way that cleanly separates essential business rules from infrastructure-specific details. This method effectively future-proofs software against shifts in cloud strategy or pricing, challenging the common belief that adopting serverless computing requires an irreversible commitment to one vendor's ecosystem.
The technical foundation of this approach is Clean Architecture, a design philosophy that organizes software into distinct, independent layers. At the very center is the core business logic, written in a language like Kotlin, which remains completely unaware of the outside world—it knows nothing about specific databases, web frameworks, or cloud providers. In the presented example, Spring Cloud Function acts as a crucial abstraction layer, creating a generic programming model for serverless functions. This model is then implemented with specific "adapters" for each cloud provider, such as one for AWS Lambda and another for Azure Functions. The project uses Gradle modules to strictly enforce these boundaries, preventing the business logic from accidentally depending on any provider-specific code and thus ensuring its purity and portability.
This architecture's strategic importance is significant for CTOs, developers, and founders. Vendor lock-in occurs when the cost and effort of switching from one cloud provider to another become prohibitively high, weakening a company's negotiating power and limiting its ability to adopt best-of-breed services from different vendors. By building portable serverless functions, organizations retain their strategic agility. If a competitor offers better pricing, superior performance in a key region, or a unique service, the ability to migrate or operate in a multi-cloud environment becomes a realistic option rather than a multi-year re-engineering project. This freedom is a powerful tool for managing both risk and long-term operational costs in a cloud-native world.
Beyond just code portability, the presentation demonstrated a holistic approach to multi-cloud deployment using the Terraform Cloud Development Kit (CDK). This tool allows teams to define their infrastructure—such as the serverless functions, API gateways, and permissions—using a familiar programming language. This unified Infrastructure as Code (IaC) strategy means a single repository can contain the logic to deploy the entire application stack to both AWS and Azure. The practical takeaway for businesses is a dramatic reduction in the operational overhead of a multi-cloud strategy. It streamlines development workflows, reduces configuration errors, and makes the goal of a truly cloud-agnostic architecture an achievable engineering reality.
This methodology signals a significant maturation in the serverless computing landscape. The initial wave of serverless adoption was driven by speed and reduced infrastructure management. However, as serverless becomes a core component of enterprise applications, the focus is shifting toward long-term sustainability, governance, and architectural resilience. Patterns like the one presented show that it is possible to embrace the benefits of serverless—such as scalability and pay-per-use pricing—without sacrificing architectural principles or strategic flexibility. It represents a move away from quick, platform-specific solutions and towards building durable, adaptable software assets that can evolve with the business.
Why it matters
This architectural pattern directly tackles serverless vendor lock-in, a major strategic risk for companies. It gives technical leaders the flexibility to switch cloud providers, optimize costs, and avoid being trapped in a single ecosystem, which can become expensive and restrictive over time.
Business impact
By decoupling business logic from specific cloud services, companies can significantly reduce the cost and complexity of migrating or operating across multiple clouds. This approach de-risks long-term infrastructure decisions, improves developer productivity by standardizing code structure, and strengthens a company's negotiating position with cloud vendors.
Tags
Related on Notifire
Related stories
Primary source: InfoQ
