AWS Builder Center
Building Secure and Efficient SaaS Platforms on AWS Serverless

Building Secure and Efficient SaaS Platforms on AWS Serverless

Event: AWS User Group UK Meetup | Speaker: Guilherme Dalla Rosa (CTO & Co-Founder, MerCloud; AWS Community Builder; AI Consultant) | Date: 15 July 2026 | Location: AutogenAI, London

This week at the AWS User Group UK meetup in London, I attended a practical session on building multi-tenant SaaS on AWS, and the core message was clear: serverless is a strong fit for secure, scalable, cost-aware SaaS architectures. The talk, delivered by Guilherme Dalla Rosa, focused on how AWS building blocks like API Gateway, Lambda, Cognito, DynamoDB, and S3 can be combined to serve multiple tenants from a single platform while preserving isolation.
Why multi-tenancy matters
Multi-tenancy is an architecture where a single software instance serves multiple customers, or tenants, while still allowing strong data isolation and efficient resource use. The speaker contrasted this with the traditional single-tenant model, where each customer gets a separate stack, which quickly leads to higher costs, slower deployments, and harder operations as the customer base grows. In SaaS, that becomes a serious problem because growth should improve margins, not destroy them.
A useful takeaway was the trade-off between isolation and operational simplicity. Shared infrastructure can dramatically improve cost efficiency and speed, but it only works if tenant boundaries are designed carefully from day one.
Tenant isolation patterns
The talk broke data isolation into three common patterns: silo, bridge, and pool. In the silo model, each tenant gets its own database instance; in the bridge model, tenants share a database but use separate schemas; and in the pool model, tenants share the same schema and tables, usually separated by tenant identifiers in the primary keys and queries. The right choice depends on compliance needs, customer expectations, and how much operational complexity the business can handle.
A practical recommendation from the session was to segment customers by tier. Many SaaS companies use a shared multi-tenant pool for standard customers, while reserving isolated stacks for enterprise tenants with stricter compliance or performance requirements. That approach balances scalability with flexibility.
Serverless as the platform layer
One of the strongest parts of the talk was the case for serverless. Instead of paying for idle capacity, serverless lets the platform scale with actual demand, which helps align cost with usage. The speaker showed how this is especially valuable in SaaS, where traffic often rises and falls throughout the day and over the week.
The example architecture used API Gateway as the front door and Lambda as the backend compute layer. That combination keeps the system lean, reduces operational overhead, and makes it easier to focus on product features instead of infrastructure management. For teams building modern SaaS products, that is a major advantage.
Authentication and authorization
A key theme in the session was that authentication is not enough; authorization must also be tenant aware. Cognito can be used with custom attributes, user groups, or even separate user pools per tenant, depending on how much isolation is needed. The talk highlighted that user pools per tenant offer the highest degree of separation, while custom attributes and groups are more flexible for shared environments.
The most interesting part was the custom authorizer pattern. Instead of trusting the backend Lambda to infer tenant context on every request, the authorizer validates the JWT, extracts tenant information, assumes a role, and passes trusted context downstream. This shifts enforcement closer to the platform and reduces the chance that application code accidentally leaks data across tenants.
Protecting tenant data
The session called out a critical “danger zone”: shared data stores such as DynamoDB and S3. If tenant filtering is handled only in application code, a bug or malicious change could expose another tenant’s data. That risk is especially severe in regulated industries, where a single isolation failure can become a business-ending incident.
To address this, the speaker showed how IAM conditions and session tags can enforce tenant boundaries at the platform layer. The idea is simple but powerful: even if code tries to query the wrong tenant’s data, AWS policies stop the request before it can succeed. This is the kind of defense-in-depth approach that makes multi-tenant SaaS safer at scale.
Lambda isolation and noisy tenants
Another practical challenge discussed was execution environment reuse in Lambda. Since Lambda may reuse the same execution environment across invocations, shared state in global scope can become a concern in multi-tenant systems. Historically, teams worked around this by deploying separate Lambdas per tenant, but that does not scale well.
The talk also addressed the noisy tenant problem, where one customer generates disproportionate traffic and affects others. API Gateway usage plans and API keys can help rate-limit tenants and assign different levels of access based on customer tier. That makes it possible to protect the platform without treating every tenant identically.
What stood out most
Three lessons stood out from the meetup. First, tenant isolation has to be designed into the architecture, not patched in later. Second, serverless is a strong fit for SaaS because it naturally supports scaling, cost efficiency, and centralized operations. Third, observability must be tenant aware, so teams can see who is using what and quickly respond when a problem appears.
The broader message was refreshingly pragmatic: don’t over-engineer too early but do use metrics to drive your optimization decisions. That is especially relevant for SaaS founders and cloud teams trying to balance speed, security, and cost.
Closing thought
This talk reinforced how much AWS serverless has matured for real-world SaaS. With the right combination of API Gateway, Cognito, Lambda, IAM, DynamoDB, S3, and usage plans, it is possible to build platforms that are efficient, secure, and ready to grow. For anyone building multi-tenant products, the main takeaway is clear: isolate at the right layer, enforce boundaries in the platform, and keep the architecture simple enough to operate well.
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article