Skip to main content

AWS Serverless Architecture Designer

Design a serverless architecture on AWS — Lambda, API Gateway, DynamoDB, S3, EventBridge, and Step Functions with CDK/SAM.

Vul de plaatshouders in

Edit the values, then copy your finished prompt.

Jouw Prompt
prompt.txt

                                

What this prompt does

This prompt designs a serverless AWS architecture for a stated [application_purpose]. It lays out API Gateway plus Lambda for [api_endpoints], DynamoDB tables modeled around your [access_patterns], S3 for [storage_use], EventBridge for [event_flows], Step Functions for [workflows], Cognito auth, CloudFront, SQS dead-letter queues, CloudWatch dashboards and alarms, and infrastructure as code with [iac_tool]. It also covers cold-start optimization, a cost estimate for [monthly_requests] per month, and a Mermaid architecture diagram, designed for [availability].

The structure works because serverless rewards event-driven thinking and punishes ad-hoc design. By forcing you to declare [access_patterns] up front, it pushes correct single-table DynamoDB modeling instead of relational habits that scale badly. Mapping [event_flows] and [workflows] to EventBridge and Step Functions keeps orchestration explicit and reproducible through [iac_tool]. Modeling cold starts and cost for [monthly_requests] up front is what stops a serverless design from surprising you on the latency or the bill.

When to use it

  • A spiky or unpredictable workload where you want to pay per request, not for idle servers.
  • An event-driven backend (file processing, notifications) that maps to Lambda and Step Functions.
  • Designing DynamoDB tables and you want access-pattern-first modeling, not relational guesswork.
  • Estimating monthly cost for [monthly_requests] before committing to serverless.
  • Producing a reproducible architecture in [iac_tool] rather than click-ops in the console.
  • Communicating a design to stakeholders with a clear Mermaid diagram.

Example output

You get a structured architecture: a component-by-component breakdown (API Gateway, Lambda, DynamoDB table designs keyed to [access_patterns], S3, EventBridge rules, Step Functions definition, Cognito, CloudFront, SQS DLQs, CloudWatch), [iac_tool] scaffolding, a cold-start optimization section, a cost estimate for [monthly_requests], optional VPC notes, a CI/CD outline, and a Mermaid diagram you can paste into docs.

Pro tips

  • Define [access_patterns] precisely; DynamoDB design is only as good as the queries you list, and adding patterns later is painful.
  • Be realistic about [monthly_requests]; the cost estimate is only as accurate as that input.
  • Use cold-start optimization (provisioned concurrency) selectively; it costs money, so apply it to latency-sensitive endpoints only.
  • Keep [iac_tool] consistent with your team's skills; CDK suits TypeScript teams, SAM suits simpler stacks.
  • Treat the cost estimate as a model, not a quote; validate against the AWS pricing calculator for your region.
  • Wire the SQS dead-letter queues early; silent failures in event flows are the hardest serverless bugs to find.

Frequently Asked Questions

Why does DynamoDB design depend so much on access patterns?
DynamoDB is queried by keys, not flexible SQL, so you must know your `[access_patterns]` before designing tables and indexes. Listing them up front lets the prompt model partition and sort keys and GSIs correctly. Adding an unplanned pattern later often forces a costly table redesign or migration.
Will the cost estimate for my traffic be accurate?
It is a model based on the `[monthly_requests]` you provide and standard AWS pricing, so treat it as a planning figure rather than a quote. Validate it against the AWS pricing calculator for your specific region and usage, since data transfer, storage, and per-service rates vary.
How does it handle Lambda cold starts?
The design includes a cold-start optimization section, typically covering provisioned concurrency, smaller deployment packages, and runtime choices. Apply provisioned concurrency only to latency-sensitive endpoints, since it carries an always-on cost that can undermine the pay-per-use advantage if used everywhere.
Should I use CDK or SAM for the infrastructure as code?
Set `[iac_tool]` to match your team. CDK suits teams comfortable in TypeScript or Python who want full programming-language power, while SAM is leaner for straightforward serverless stacks. Both produce reproducible infrastructure; the right choice is the one your team will actually maintain confidently.
What are the SQS dead-letter queues for?
They capture events that fail processing after retries, so failures in your `[event_flows]` don't vanish silently. Wiring DLQs early is critical because untracked event failures are among the hardest serverless bugs to diagnose; with a DLQ you get a visible, replayable record of what broke.
Engr Mejba Ahmed

Need this built for real?

Engr Mejba Ahmed

AI Developer · Software Engineer

I'm Mejba — I design and ship production AI systems, automations, and full-stack apps. If you want this turned into a working solution for your team, let's talk.

Meer in DevOps & Cloud Prompts

Engr Mejba Ahmed

Engr Mejba Ahmed

Claude Code Expert · Online

👋

Hey there!

Quick Actions

WhatsApp Instant reply

Chat on WhatsApp

+880 1723 741224 · Instant reply

Popular Questions

Engr Mejba Ahmed is connected
Engr Mejba Ahmed is typing...
Engr Mejba Ahmed avatar

✉ Want me to follow up? Drop your email

Engr Mejba Ahmed avatar

📞 Connect Directly

Choose how you'd like to reach me

WhatsApp

+880 1723 741224

Email

[email protected]

✓ Details sent! I'll get back to you shortly.

Powered by OpenAI

335+

Blog Posts

25

AI Courses

63

Projects

Services & Expertise

Pricing & Process

Learning & Resources

Connect & Support