Skip to content

AWS · Architecture tutorial

AWS 3-tier architecture explained

Follow a request through CloudFront, load balancing, application services and PostgreSQL. Learn tier boundaries, failure handling and security, then edit the diagram.

Updated November 14, 2026 · Practical walkthrough with an editable reference

Open & edit this diagram — no login required

Edits use a separate browser-local template draft. Existing saved files stay untouched.

6 components · 5 connections · Logical reference diagramZoom and customize in the canvas →

What the three tiers mean

A three-tier architecture separates presentation, application logic and persistent data. These are responsibilities, not a requirement to run exactly three servers. A browser presents information, application services enforce business rules, and a database preserves records. Independent boundaries let you discuss changes and failures without treating the whole system as one machine.

Our starter uses a browser, CloudFront, an Application Load Balancer, ECS application services, PostgreSQL and Redis. It is a logical reference: it does not yet show Availability Zones, subnet routing, task counts or security group rules. Add those details before using it as an implementation specification.

Follow one request through the diagram

The browser sends HTTPS traffic to CloudFront. Cacheable content can be served at the edge; requests needing application processing reach the load balancer and then an application target. Define cache behavior carefully so private responses are not accidentally reused for another user.

The application performs authorization and validation before reading PostgreSQL. Redis can hold disposable cached results, but a cache entry should not silently become the only copy of important business data. Define expiration, invalidation and a bounded fallback when the cache is unavailable. A database connection pool also needs limits so a burst of application instances does not exhaust database capacity.

Draw the trust boundaries explicitly

An internet-facing load balancer and private application or database resources have different network roles. Use VPC subnets, routes and security groups to express the intended reachability. A colored box labelled private is documentation; it does not configure isolation. Keep database access limited to the application paths that need it and use a managed secrets workflow for credentials.

TLS termination, outbound access, identity permissions and operational access should be decisions on the diagram. If private workloads need external services, document the egress path and its cost instead of assuming every private subnet can reach the internet.

  • Identify each public endpoint and the service that terminates TLS.
  • Specify application-to-database access and secret ownership.
  • Separate runtime permissions from deployment and operator permissions.

Design for failures before adding scale

Start with a request-rate estimate, latency target and recovery objective. Spread suitable application capacity across Availability Zones and define health checks that identify an unhealthy target. Database availability and backup restoration solve different problems: test both the failover behavior and recovery from an incorrect data change.

Load-test the system with the cache disabled, a slow database and a failed application target. Observe response latency, errors, connection usage and saturation. Autoscaling cannot repair every bottleneck; it can increase pressure on a constrained database. Add the expected failure path to the diagram rather than showing only successful requests.

Choose the simplest useful variation

ECS is one compute choice, not part of the definition of three-tier architecture. You can evaluate EC2, EKS or serverless services against team skills and workload requirements. Similarly, a small product may begin without Redis if measurements do not justify a cache.

This walkthrough explains a design pattern, not a fixed cost or availability promise. Estimate traffic, storage, egress and operations for your own region and workload. Keep the logical request view readable, then create a separate deployment view when network and zone details would overwhelm it.

Try it yourself

  1. Open the starter and rename the application to your actual service.
  2. Add two Availability Zones and annotate public versus private placement.
  3. Label cache misses, database access and the route used when an application target fails.
  4. Export a project copy and review recovery assumptions with your team.
Customize the architectureView component details and template FAQs

Further reading

Consult the platform documentation when implementing and validating your design.

More architecture tutorials