AWS · AWS Lambda · Diagram as code
AWS Lambda architecture diagram
Describe Lambda handlers, their triggers, and the data stores they read and write in plain text. ArchLex checks every connection against the AWS catalog, then renders a clean SVG with official icons.
HTTP API to Lambda to DynamoDB.
The classic serverless request path: API Gateway invokes a function that writes to DynamoDB.
provider aws
direction LR
api: api-gateway["HTTP API"]
fn: lambda["Order handler"]
db: dynamodb["Orders"]
api -[invokes]-> fn
fn -[writes]-> dbEventBridge to SQS to Lambda.
Decouple producers with a bus and a queue, then let Lambda process messages asynchronously.
provider aws
direction LR
validation normal
bus: eventbridge["Orders bus"]
queue: sqs["Order queue"]
fn: lambda["Processor"]
bus -[publishes]-> queue
queue -[invokes]-> fnPattern notes for AWS Lambda.
Placement and relationship rules ArchLex enforces for this service.
- Where Lambda sits. Lambda is a regional compute resource. Put it at the document root or inside an account/region when you want that boundary shown. It does not belong inside a VPC subnet unless you are deliberately drawing a VPC-attached function next to private resources.
- Valid connections. Common edges: api-gateway -[invokes]-> lambda, sqs -[invokes]-> lambda, eventbridge -[triggers]-> lambda, lambda -[writes]-> dynamodb|s3|rds, and lambda -[publishes]-> sns|sqs|eventbridge. An edge that breaks those endpoints returns AWS-RELATIONSHIP-INVALID-ENDPOINT-001.
- What ArchLex does not check. It does not read your AWS account, IAM policies, concurrency settings, or runtime configuration. It checks the diagram you wrote.
Ask an agent to draw it.
Install the ArchLex skill or connect the free MCP server, then paste this prompt.
npx skills add baires/archlexDraw an AWS Lambda architecture diagram with API Gateway invoking a Lambda function that writes to DynamoDB. Validate it with ArchLex and give me a playground link.Prefer MCP? Follow the MCP server guide.
Related AWS examples.
- Serverless MicroserviceAPI Gateway invoking Lambda function accessing DynamoDB table
- Full-Stack Serverless Web ApplicationRoute 53 DNS, CloudFront CDN, S3 static assets, API Gateway, Lambda, and DynamoDB
- Event-Driven MicroservicesEventBridge publishing to SQS Queue subscribed by Lambda
- Async Fan-Out Event ProcessingAPI Gateway triggering SNS Topic fan-out to parallel SQS Queues for Email workers and Analytics S3 Data Lake
AWS Lambda diagram questions.
Can ArchLex draw an AWS Lambda architecture diagram as code?
Yes. Write the Lambda function and its triggers or stores in ArchLex, validate against the AWS catalog, and render SVG with the official Lambda icon. Open the same source in the playground to edit it.
Which services can invoke Lambda in ArchLex?
Declared invokes/triggers sources include api-gateway, sqs, eventbridge, eventbridge-scheduler, s3, sns, and step-functions. Targets for Lambda writes include dynamodb, s3, and rds.
Does ArchLex verify my Lambda IAM role?
No. It validates declared resources and relationship endpoints in the diagram. It does not inspect IAM policies, environment variables, or deployed function configuration.
How do I open this Lambda diagram in the playground?
Use the Open in Playground button on this page. It deep-links to playground.archlex.dev with the ArchLex source in the code query parameter so you can edit and re-render immediately.
More AWS service diagrams.
Open source · MIT licensed