Skip to main content

Claude/ChatGPT Prompt to Design a 3-Tier Web App Architecture on AWS

Design a production 3-tier web app on AWS: Route 53 and CloudFront edge, load-balanced app tier, high availability, least-privilege IAM, and a Terraform sketch.

Fill in the placeholders

Edit the values, then copy your finished prompt.

Your Prompt
prompt.txt

                                

What this prompt does

This prompt frames the AI as a senior AWS solutions architect that specifies a 3-tier web app tightly enough to build, with a real Terraform sketch rather than vague guidance. You provide the [workload], the [region_strategy], and the [compliance] needs. It delivers six layers: edge and routing with Route 53, CloudFront, and an ALB; a compute tier of ECS Fargate or EC2 with an Auto Scaling Group justified for the workload; a data tier of RDS Multi-AZ plus ElastiCache with S3 for objects; a VPC with public and private subnets, NAT gateways, and tight security groups; least-privilege IAM roles per tier; and observability via CloudWatch and X-Ray. Output is a Mermaid diagram followed by a Terraform sketch of the core resources.

The structure works because it forces the day-one decisions that are costly to retrofit later: network segmentation, least-privilege IAM, and a multi-AZ database. [workload] drives the compute choice and sizing, so a high-MAU SaaS gets a different tier and scaling posture than a small internal app. [region_strategy] shapes the VPC layout and availability design across availability zones. [compliance] pushes the IAM scope and encryption requirements, such as encryption at rest and in transit, into the design from the start. The Mermaid diagram gives you the overall shape to sanity-check before the Terraform sketch gives you the buildable core resources to start from.

When to use it

  • You are designing a new 3-tier web app on AWS from scratch.
  • You want the costly day-one decisions (network, IAM, database) made right.
  • You need a Multi-AZ database and private subnets locked in early.
  • You want least-privilege IAM roles per tier, not one broad role.
  • You need a diagram plus a Terraform sketch, not vague guidance.
  • You have compliance needs that shape encryption and access.

Example output

You get a Mermaid architecture diagram showing the edge, compute, and data tiers across the VPC, followed by a Terraform sketch of the core resources: Route 53 and CloudFront and the ALB, the compute tier with autoscaling, RDS Multi-AZ and ElastiCache with S3 for objects, the VPC with public and private subnets and NAT gateways and tight security groups, least-privilege IAM roles per tier, and the CloudWatch and X-Ray observability wiring. It is detailed enough to start building from, not a high-level overview you still have to turn into infrastructure.

Pro tips

  • Describe [workload] concretely (type and scale) so the compute choice and sizing fit.
  • Set [region_strategy] clearly; it shapes the VPC and availability design.
  • State [compliance] honestly; it drives IAM scope and encryption requirements.
  • Pin the Multi-AZ database and private subnets first; that is where outages and breaches start.
  • Treat the Terraform sketch as a starting point to flesh out, not production-ready as-is.
  • Get subnets and least-privilege right up front; retrofitting them under load is expensive.

Frequently Asked Questions

Does it produce buildable Terraform or just a diagram?
It produces both: a Mermaid architecture diagram followed by a Terraform sketch of the core resources. The sketch is meant to be detailed enough to build from, but treat it as a starting point you flesh out and review rather than production-ready infrastructure code you apply unchanged.
Why does it emphasise Multi-AZ and private subnets so heavily?
Those are the day-one decisions that are expensive to retrofit under load and where real outages and breaches start. A single-AZ database and flat networks are common early mistakes, so the prompt pins Multi-AZ and private subnets first to get availability and isolation right from the beginning.
Does it handle compliance requirements?
It factors in whatever you put in `[compliance]`, shaping the IAM least-privilege roles and encryption at rest and in transit. State your real requirements clearly so the design reflects them, but it is an architecture sketch, not a compliance certification, so validate it against your specific audit obligations.
Will it choose ECS Fargate or EC2 for the compute tier?
It justifies a choice between ECS Fargate or EC2 with an Auto Scaling Group based on your `[workload]`, so the compute tier matches your scale and operational model. Describe the workload concretely, including type and traffic, so the recommendation and its sizing fit what you are actually running.
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.

More in AWS & Cloud Architecture 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