AWS serverless architecture diagram

This AWS serverless architecture diagram shows a web or mobile app built on managed AWS services, arranged into three layers: Edge, Compute and Data. It is for students learning cloud architecture and for developers sketching a serverless backend before they build it.

Architecture diagram for a serverless app on AWS

Example: Architecture diagram for a serverless app on AWS: click to open it in the editor and change it.

The three layers

GroupServicesRole
EdgeCloudFront, API Gateway, CognitoServes the static site, receives REST calls and checks user tokens
ComputeLambda Functions (Node.js), SQS Queue, Worker LambdaRuns request logic and handles background jobs
DataDynamoDB, S3 (Files)Stores records and uploaded files

How a request flows

  1. The Web / Mobile client loads the static site through CloudFront.
  2. The client sends REST calls to API Gateway.
  3. API Gateway asks Cognito to verify the user's token.
  4. Valid requests go to Lambda Functions, written in Node.js.
  5. Lambda Functions read and write data in DynamoDB and store files in S3.
  6. Slow work is sent as async jobs to the SQS Queue. This is shown as a dashed line.
  7. The Worker Lambda takes jobs from the queue and writes the results to DynamoDB.

The dashed path separates synchronous work from asynchronous work. The user gets a fast response, and heavy tasks run in the background.

How to adapt it for your project

  • Rename Lambda Functions to match your real handlers, such as orders or users, or split them into several nodes.
  • Replace DynamoDB with Aurora Serverless if your data is relational.
  • Add a dead-letter queue next to the SQS Queue for failed jobs.
  • Remove Cognito if your API is public, or swap in another identity provider.
  • Label each edge with the data it carries so reviewers can follow the flow.

Tip: Keep the group colours the same (purple for Edge, orange for Compute, green for Data) when you add services. Readers can then see at a glance which layer each new part belongs to.

Frequently asked questions

What AWS services are in a typical serverless architecture diagram?

This diagram uses CloudFront, API Gateway and Cognito at the edge, Lambda and SQS for compute, and DynamoDB and S3 for data. Together they cover hosting, APIs, authentication, logic, background jobs and storage.

Why is there an SQS queue between the two Lambdas?

The queue lets the main Lambda Functions hand off slow work as async jobs and reply to the user right away. The Worker Lambda processes those jobs separately and saves the results to DynamoDB.

How does authentication work in this serverless diagram?

API Gateway sends each incoming token to Cognito for verification before passing the request to Lambda. Requests with invalid tokens never reach your functions.

Make your own architecture diagram with AI →

More templates

← All templates

Try AI Flowchart free →