Home icon

Scale multi-tenant SaaS with per-tenant version pinning using Amazon CloudFront

.NET on AWS Blog



This article demonstrates how to scale multi-tenant SaaS applications using CloudFront multi-tenant distributions with per-tenant version pinning, enabling zero-downtime version switching without Application Load Balancer scaling constraints.

  • Use CloudFront multi-tenant distributions with a version parameter to route each tenant to their pinned version (ga, preview, canary)
  • Store tenant configuration in DynamoDB with domain as partition key; DynamoDB Streams trigger Lambda to reconcile CloudFront distribution tenants
  • Deploy per-version ASP.NET Core services on Amazon ECS behind a fixed set of Application Load Balancer path-based rules
  • Onboard tenants with a single DynamoDB write; switch versions with a single update—no infrastructure changes required
  • Resolve tenant identity from the Host header in ASP.NET Core middleware; lookup tenant configuration in DynamoDB with caching
  • Supports multi-region extension using DynamoDB global tables and regional origins in CloudFront

This approach eliminates per-tenant load balancer rules and certificates, scales to 10,000 tenants per distribution, and enables instant zero-downtime version switches.



Go to article

The AWS News Feed is currently looking for gold sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.

Related articles

Mar 4
2024
Support multi-tenant applications for SaaS environments using Amazon QuickSight
Oct 13
2025
Secure customer resource access in multi-tenant SaaS with Amazon VPC Lattice
Nov 20
2025
Building multi-tenant SaaS applications with AWS Lambda’s new tenant isolation mode
Sep 21
2026
How Benchling secured multi-tenant AI agents with Amazon Bedrock AgentCore

The AWS News Feed is currently looking for silver sponsors. If you want to support the AWS community and reach a large audience of AWS professionals, consider sponsoring the AWS News Feed.