Serverless API diagram template

An HTTP API backed by stateless functions, a managed database and an event queue for slow work.

Serverless API architecture diagramOpen in ArchBoard

Builds a new scene in your browser. Your existing scenes are not touched.

About this design

Serverless moves the operational burden of servers, patching and capacity onto the platform, and charges per invocation instead of per idle hour. In this template an API gateway maps routes to functions; each function does one job, reads or writes a managed key-value database, and stays stateless between calls. Slow or retryable work, such as sending email or generating a PDF, is placed on a queue and handled by a second function so the HTTP response stays fast. Authentication is delegated to a managed identity provider and verified at the gateway. It is a good fit for spiky or unpredictable traffic. Use the diagram to discuss cold starts, concurrency limits that protect a downstream database, local development without the cloud, vendor lock-in, and the point at which steady heavy traffic makes a container cheaper than a function.

Diagram as text

This is the source of the diagram, in the ArchBoard diagram DSL. Paste it into Tools, Diagram from text to rebuild or change it.

title "Serverless API"
direction LR
client "App" -> gateway apigw "API gateway" -> auth cognito "Cognito"
gateway -> function lambda "Read handler" -> db dynamodb "Items table"
gateway -> function lambda "Write handler"
write-handler -> items-table
write-handler -> queue sqs "Work queue" -> function lambda "Email sender"
email-sender -> external "Email provider"

More web architecture templates