Guide~9 min · intermediate

Hosting your SaaS on AWS

AWS offers at least four ways to host a SaaS, from near-effortless to full-control. Here are the four paths, what they cost in time and money, and how to choose based on your team.

StackAmplifyEC2ECSLambdaRDSS3
01

The four paths

From most managed to most manual. The further down, the more you control — and the more you manage.

Amplifythe “Vercel of AWS”: push, build, deploy. The simplest.
Lambdaserverless: API + static front, pay per use.
ECS/Fargateyour container, no machine to manage. The sweet spot.
EC2a machine of your own. Full control, floor cost at stable load.
02

How to choose

Solo / MVP

Amplify or Lambda: the least infra possible, you stay on the product.

Small team

ECS/Fargate: clean containers, managed scale, no sysadmin.

Control needed

EC2: legacy PHP, GPU, precise config, or floor cost at constant load.

Common to all

RDS for the database, S3 for files. That doesn’t change with the compute.

Worth noting

The compute choice deserves its own article: EC2, ECS or Lambda: how I choose.

03

The common foundation

Whatever the compute, the data architecture is the same: managed database on RDS (never on the compute’s disk), files and media on S3 served by CloudFront. That decoupling is what makes the whole thing robust and scalable.

// the path of a request
Visitor
client
CloudFront
CDN
EC2
web · PHP/Next
RDS
database
S3
product photos
Lambda
→ WebP + sizes
CloudFront also serves the images from S3
Worth noting

This architecture is detailed in why AWS for an e-commerce and its sequel scale without blowing the budget.

04

The cost

AWS is more verbose than Vercel, but often cheaper at scale — provided you watch it. The classic trap: underestimating peripheral costs (data transfer, NAT, snapshots).

Careful

Set a budget with an alert from day one. The line items that drift are in the 5 lines that wreck your bill.

05

Sources & further reading

Sources & further reading
01AWS — Choosing an AWS compute service for your workloadThe official decision guide: EC2, containers, serverless, and the criteria to decide.02AWS — Welcome to AWS Amplify HostingGit workflow, feature branches, PR previews, atomic deployments on the AWS CDN.03AWS — Amplify PricingThe real numbers: 1,000 free build minutes, 15 GB transfer, then $0.15/GB and $0.30 per million SSR requests.04AWS — Architect your solution for Amazon ECS (launch types)When to pick Fargate, Managed Instances or EC2 as the capacity behind ECS.05AWS — Fargate PricingvCPU + memory billed per second (1-minute minimum), Graviton cheaper, Fargate Spot up to -70%.06AWS — Lambda pricing modelRequests + GB-seconds rounded to the millisecond, with 1M requests and 400,000 GB-s free each month.07AWS — Multi-AZ deployments for Amazon RDSThe database foundation: Multi-AZ DB instance (failover) vs Multi-AZ DB cluster (failover + reads).08AWS — SaaS Lens, Well-Architected FrameworkAWS best practices specific to multi-tenant SaaS workloads, across the five pillars.
In short

AWS doesn't force a choice between simplicity and control: Amplify to start, ECS when it grows, EC2 when you want to own everything — always with RDS and S3 as the foundation. Choose for your team today, not for the scale you hope for.

AWS — SaaS on AWS ↗
Read next