Prompt
I'm unhappy with vendor lock-in on serverless, what are my options?
Latest observation
If you want to reduce vendor lock-in from serverless, you basically have a few paths, depending on how much operational burden you’re willing to take on:
1) Stay with serverless, but design for portability
Good if you like the ops model and mainly want to avoid being trapped.
- Use portable runtimes: containers, standard languages, common frameworks
- Avoid provider-specific services in your core app logic
- Put cloud-specific integrations behind adapters
- Use open standards where possible:
- OpenTelemetry for tracing/metrics
- OpenAPI for APIs
- Terraform/Pulumi for infra abstractions
- Queue/event abstractions that can map across providers
- Keep business logic separate from platform glue
Tradeoff: still some lock-in, but much less.
2) Move from “serverless functions” to containers
A common middle ground.
- Run on Kubernetes, ECS, Cloud Run, Azure Container Apps, or similar
- You keep autoscaling and managed infrastructure
- Less dependence on function-specific runtime limits, event models, and IAM quirks
Tradeoff: more ops than pure serverless, but usually far less lock-in.
3) Use self-managed infrastructure
If your main concern is control and portability:
- Deploy to VMs, Kubernetes, or bare container platforms
- Own the networking, runtime, and scaling logic
- Can move clouds more easily
Tradeoff: most operational overhead.
4) Use a multi-cloud abstraction layer
Useful if you know you need portability across providers.
- Cloud-agnostic orchestration with Kubernetes
- Infrastructure as Code with Terraform
- Event streaming via Kafka / Redpanda
- Databases with standard SQL and portable drivers
Tradeoff: abstraction layers can add complexity and sometimes hide cloud-specific advantages.
5) Accept some lock-in strategically
Sometimes the cheapest option is to use serverless where it makes sense and intentionally lock in only where the benefit is high.
- Use vendor-specific services for non-core features
- Keep core domain logic portable
- Document exit strategies for critical components
Tradeoff: pragmatic, but not fully portable.
Practical rule of thumb
If you want maximum portability:
- containers + Kubernetes + Terraform + standard databases/protocols
If you want most of the serverless benefits with less lock-in:
- managed containers or Cloud Run-style platforms
If you want lowest ops:
- full serverless, but isolate vendor-specific pieces
If you want, I can also give you:
- a decision matrix comparing serverless vs containers vs Kubernetes, or
- a migration plan for getting out of a specific serverless platform.