AWS cloud architecture is the way you arrange accounts, networking, compute, databases and day-to-day operations on AWS so that an application keeps running when part of AWS fails and the bill matches your estimate. For a typical web app or SaaS product, a sound default is: separate accounts for production and everything else, one Region close to your users, a VPC spread across two or three Availability Zones, containers on ECS Fargate behind an Application Load Balancer, PostgreSQL on RDS in Multi-AZ mode, S3 and CloudFront for files, and all of it written as code and watched by CloudWatch alarms. To check a design, AWS's Well-Architected Framework gives you six pillars: operational excellence, security, reliability, performance efficiency, cost optimization and sustainability.
At on-demand prices that setup costs about $280 a month in Frankfurt before traffic-dependent charges. The line-by-line breakdown, checked against AWS's price list on 18 October 2026, is further down.
Regions, Availability Zones and accounts
A Region is a separate geographic area, such as Frankfurt (eu-central-1) or Ireland (eu-west-1). Every Region has at least three Availability Zones. An AZ is one or more data centres with their own power, cooling and physical security, many kilometres from the other AZs in the Region but within 100 km of them, connected by a network fast enough for synchronous database replication.
Running in two or three AZs protects you from losing a data centre. Running in two Regions protects you from a Region-wide problem, but it roughly doubles your infrastructure, makes you replicate data over long distances and turns failover into a project of its own. Most products should run Multi-AZ in one Region and add a second Region only when a contract or a written recovery-time target requires it.
To pick the Region, first rule out the ones where your data isn't allowed to live. Among the rest, go by latency to your users, measured from their networks rather than guessed, and then check that the services you need are there and what they cost. Prices do differ: a NAT gateway costs $0.045 an hour in US East (Ohio) and $0.052 in Frankfurt. New services also arrive one Region at a time. Lambda Web Functions, announced on 12 October 2026, launched only in N. Virginia, Ohio, Oregon, Tokyo and Ireland.
The AWS account is the boundary teams most often skip. AWS's guidance on organizing your environment with multiple accounts recommends several accounts from the first production workload. An account is an isolation boundary for access, quotas and billing: nothing crosses between accounts unless you allow it, and extra accounts cost nothing in themselves because AWS charges only for usage. The minimum we would set up with AWS Organizations:
- A management account that holds billing and the organization and runs nothing else.
- A production account.
- A staging or development account that people can break without consequences.
- Optionally, a separate account for logs and audit trails, so that someone with admin rights in production can't quietly delete them.
People sign in through IAM Identity Center with short-lived credentials, and nobody gets an IAM user with long-lived access keys. Since June 2025 AWS has required MFA on the root user of every account type, so that part is enforced for you; keep the root user for the few tasks that need it. CI/CD pipelines should assume a role through OIDC instead of storing keys.
The reference setup, layer by layer
Users
|
+--> CloudFront --> S3 (static assets, user uploads)
|
+--> Route 53 --> Application Load Balancer (public subnets, AZ a + AZ b)
|
+--> ECS Fargate service, 2+ tasks (private subnets, AZ a + AZ b)
|
+--> RDS for PostgreSQL, Multi-AZ (private subnets)
+--> SQS queue --> Lambda or Fargate workers
+--> NAT gateway --> third-party APIs
Around it: CloudWatch logs, metrics and alarms, CloudTrail, AWS Backup, Secrets ManagerNetwork
Use one VPC per environment, with public subnets for the load balancer and private subnets for the application and the database, in at least two AZs. Security groups chain from one tier to the next: the load balancer accepts HTTPS from the internet, the application accepts traffic only from the load balancer's security group, and the database only from the application's. Nothing on the internet can open a connection into a private subnet. Your own admin access comes through Systems Manager Session Manager or a VPN, so there is no SSH port left open by accident.
The private subnets reach the internet through NAT. A classic NAT gateway sits in one AZ's public subnet, so you run one per AZ: if your only gateway is in AZ a and that AZ goes down, the tasks in AZ b lose their outbound connections as well. Since November 2025 you can create a regional NAT gateway instead, a single gateway that expands across the AZs your workloads use and needs no public subnet. It is billed for every AZ it is active in, so it costs the same as one gateway per AZ. What it saves is the route-table work each time you add an AZ.
Add an S3 gateway endpoint on the first day. Gateway endpoints are free, and because ECR stores container image layers in S3, the endpoint also keeps image pulls away from the NAT gateway's per-GB charge. Interface endpoints are billed by the hour in every AZ, and the three a private Fargate service typically needs (ECR API, ECR Docker and CloudWatch Logs) cost about $53 a month in Frankfurt across two AZs. They pay for themselves only when a lot of AWS-bound traffic would otherwise go through NAT, so add them when the bill shows that traffic.
Compute
Choose by the shape of the workload.
Option | Good fit | Watch for |
|---|---|---|
ECS on Fargate | Web apps and APIs that run all day, background workers | You pay for running tasks even when traffic is low |
Lambda | Event-driven work: queue messages, file uploads, schedules, spiky low-volume endpoints | 15-minute limit per invocation, a default quota of 1,000 concurrent executions per Region (lower on new accounts), bursts of database connections |
EC2 with Auto Scaling | GPUs, licensed software, steady heavy load you can commit to | You patch and harden the operating system |
EKS (Kubernetes) | Many services and a team that already runs Kubernetes | $0.10 an hour per cluster before any nodes, $0.60 once a version leaves standard support, and an upgrade roughly every year |
Elastic Beanstalk | Apps that already run on it | Platform versions are retired, so upgrades end up on your roadmap |
For a new containerised web app we would start with ECS Express Mode, which AWS launched in November 2025. You give it a container image and two IAM roles, and it creates a Fargate service, a load balancer, auto scaling and the networking in your own account, with no charge beyond those resources. Up to 25 Express Mode services can share one load balancer, which matters when every ALB costs about $26 a month. It is also where AWS now points people since it closed App Runner to new customers, so older guides that recommend App Runner are out of date.
Lambda is excellent around the edges of a system like this: processing uploads, reacting to queue messages, running scheduled jobs. If Lambda functions talk to RDS, put RDS Proxy between them, so that a burst of invocations doesn't use up the database's connections. The hospital rostering platform we build for our client Oplist runs on ECS Fargate, Lambda and CloudWatch.
Lambda Web Functions are worth watching. They run an ordinary Express, Fastify or Next.js server on Lambda, bill CPU only for the time your code actually uses it, and bill memory for as long as the execution environment exists. At launch they support only Node.js 24 on Arm64, in the five Regions listed above. The service is a week old, and we wouldn't put a production system on it yet.
The Elastic Beanstalk row comes from our work on Diderot, the course platform developed at Carnegie Mellon. We upgraded its Beanstalk platform and Python version and rebuilt the staging and production environments while courses were running on it. A managed platform still leaves platform and runtime upgrades to you, and they need a slot on the roadmap like any other work.
Data
Production data goes on RDS for PostgreSQL (or MySQL) with Multi-AZ switched on. RDS keeps a synchronous standby in another AZ and promotes it when the primary fails. AWS says failover typically takes 60 to 120 seconds and works by repointing the database's DNS name, so your application has to reconnect and retry, and must not cache DNS for long (old JVM defaults are the classic trap). The standby serves no reads. For read capacity, add read replicas, or choose a Multi-AZ DB cluster, which has two readable standbys across three AZs.
Multi-AZ is not a backup. A bad migration or an accidental DELETE is copied to the standby straight away. Keep automated backups with point-in-time recovery, copy snapshots to another account with AWS Backup, and restore one every quarter to prove that it works.
We wouldn't start a typical SaaS on Aurora. It becomes worth pricing when a single instance struggles, or when you need faster failover and more replicas. DynamoDB fits when the access patterns are known and simple, such as lookups by key at high volume.
S3 is the default for files and a good hand-off point between systems. On the real-time odds data platform we built and ran for our client EdgeHunters for about two and a half years, the latest odds were packaged and pushed to S3 and PostgreSQL every five minutes for the product to read. Since April 2023 new buckets have Block Public Access on and ACLs off by default. Leave it that way, serve public files through CloudFront with origin access control, and add lifecycle rules that move old objects to cheaper storage classes.
Operations
Write the infrastructure as code from day one, in CloudFormation, the CDK or Terraform. Anything clicked together in the console drifts, and a year later nobody remembers why it exists. With code, a change gets reviewed before it reaches production, and staging can be rebuilt from the same definitions as production instead of from someone's memory.
Then the monitoring we would not go live without:
- CloudWatch alarms on the load balancer's 5xx rate and p95 latency, database CPU, free storage and connection count, and the age of the oldest message in each queue.
- A retention period on every log group. By default CloudWatch keeps logs indefinitely, and you pay for storing them.
- CloudTrail for the whole organization, and GuardDuty switched on in every account.
- An AWS Budgets alert and Cost Anomaly Detection, so a runaway resource shows up within days, long before the invoice.
What the reference setup costs
This is the production baseline in Frankfurt with on-demand prices from AWS's price list on 18 October 2026, assuming 730 hours a month and light traffic.
Item | Assumption | Per month |
|---|---|---|
Application Load Balancer | $0.027 an hour plus about one capacity unit | $26 |
NAT gateways | Two zonal gateways, or one regional gateway in two AZs, at $0.052 an hour per AZ (data processed is extra) | $76 |
Public IPv4 addresses | Four (load balancer and NAT gateways) at $0.005 an hour | $15 |
ECS Fargate | Two tasks with 0.5 vCPU and 1 GB each, x86 | $41 |
RDS for PostgreSQL | db.t4g.medium, Multi-AZ, 50 GB of gp3 storage | $122 |
Total | Before data transfer, logs, S3, CloudFront, backups and support | about $280 |
The network pieces (load balancer, NAT gateways and IP addresses) add up to about $116, nearly three times what the containers running the application cost. The database is the largest single line, because Multi-AZ means paying for two instances. Keep an eye on its CPU, too: db.t4g is a burstable class, and RDS runs it in Unlimited mode, so if average CPU over a rolling 24 hours stays above the instance's baseline you are billed for the extra. A database that is busy all day is more predictable on an m-class instance, which has no credit system.
Where the money can come back:
- Staging doesn't need production's availability. With one NAT gateway, one task and a single-AZ db.t4g.micro with 20 GB, a staging copy of the setup above comes to about $110 a month, and scaling the task to zero at night trims a little more.
- Arm (Graviton) Fargate tasks cost 20 percent less than x86 tasks of the same size in Frankfurt, which takes the containers above from $41 to $33. Node.js, Python and JVM images usually build for Arm without code changes; check native dependencies first.
- Once usage is steady, Compute Savings Plans cover EC2, Fargate and Lambda at up to 66 percent off on-demand rates. Database Savings Plans, launched in December 2025, take up to 20 percent off provisioned RDS and Aurora instances for a one-year commitment (the 35 percent in AWS's headline is for serverless databases). Check that your instance family is covered before you commit.
- The first 100 GB of data transfer out to the internet each month is free across all services. Beyond that, egress is often the line that surprises people.
Our cloud cost optimization post goes further into tagging, rightsizing and commitments.
Checking the design against the six pillars
The Well-Architected Tool in the AWS console takes you through a long questionnaire for free. For a small team, one question per pillar catches most of the problems:
Pillar | Ask first |
|---|---|
Operational excellence | Can someone other than the author deploy and roll back in under fifteen minutes? |
Security | Who can read production data today, and would you notice if that changed? |
Reliability | What happens if one AZ or the database primary disappears, and have you tried it? |
Performance efficiency | Are instance and task sizes based on measurements or on the first guess? |
Cost optimization | Does every resource have an owner tag, and does someone look at the bill every week? |
Sustainability | What is running that nobody uses: idle environments, oversized databases, logs kept forever? |
What we would leave out at the start
Active-active multi-Region, Kubernetes, a service mesh and a dozen microservices all solve real problems, but most products don't have those problems in their first years, and each one adds monthly cost and on-call work. We would start with one Region, one container service and one database, and add the next piece when a measurement shows the current one can't keep up. If you are moving an existing system to AWS rather than starting fresh, our cloud migration strategy post covers what to move first.
Frequently asked questions
How many pillars does the AWS Well-Architected Framework have?
Six. Sustainability was added at re:Invent in December 2021, so material that lists five pillars predates it.
Do I need a NAT gateway?
Only if something in a private subnet has to reach the internet: third-party APIs, package registries such as npm or PyPI, images from Docker Hub. If the only outbound traffic goes to AWS services, the free S3 gateway endpoint plus interface endpoints for ECR and CloudWatch Logs can replace it. Putting Fargate tasks in public subnets with public IPs also avoids NAT, at $0.005 an hour per address, but then a loosened security group exposes the tasks directly, so we would keep them private.
Can I run this setup on the AWS Free Tier?
Not for long. New accounts get $100 in credits, plus up to $100 more for trying a few services, and the free plan ends after six months or when the credits run out, whichever comes first. At about $280 a month, the reference setup would use them up within the first month. Some allowances stay free on every account: Lambda's 1 million requests and 400,000 GB-seconds a month, for example, so a small event-driven workload can cost close to nothing.
If you would like a second opinion on an AWS design, get in touch.
Related Articles
Cloud Migration Strategy: How to Pick the Right R for Each App
Choose one of the 7 Rs per application, map what each system talks to, move in waves, rehearse the rollback and budget for the costs most migration plans leave out.
Read More: Cloud Migration Strategy: How to Pick the Right R for Each AppAWS Cost Optimization: What to Fix First, and What It Saves
The order matters more than any single trick: clean up, rightsize and move to Graviton before you buy Savings Plans. Worked examples use AWS list prices from October 2026.
Read More: AWS Cost Optimization: What to Fix First, and What It SavesDocker Compose vs Kubernetes: When One Server Stops Being Enough
Docker Compose runs a multi-container app on one machine; Kubernetes runs it across many. How to tell which you need and what Kubernetes really costs.
Read More: Docker Compose vs Kubernetes: When One Server Stops Being Enough
