AWS Builder Center
StackSage: An AI-Powered AWS Architecture Advisor with Well-Architected Insights

StackSage: An AI-Powered AWS Architecture Advisor with Well-Architected Insights

Designing a reliable AWS architecture can be challenging. StackSage simplifies the process with intelligent architecture recommendations, interactive diagrams, AWS Well-Architected evaluations, service comparisons, and security-conscious Terraform scaffolding.

StackSage: An AI-Powered AWS Architecture Advisor with Well-Architected Insights

Designing a cloud architecture is not simply about selecting a few AWS services and connecting them together. Every application has different requirements, workloads, traffic patterns, scalability expectations, security considerations, and budget constraints.
Choosing between AWS Lambda and EC2, Amazon RDS and DynamoDB, or ECS and EKS can significantly influence the operational complexity, performance, and long-term cost of an application.
To make these decisions easier, I built StackSage, a full-stack cloud architecture advisor that helps developers and cloud enthusiasts explore, evaluate, and design AWS architectures based on their project requirements.
The goal was to create more than another cloud service directory. I wanted to build a practical tool that connects architectural decisions with technical reasoning, interactive visualizations, and infrastructure-as-code generation.

1. The Problem: Choosing the Right AWS Architecture

AWS provides a wide range of services, each designed for different workloads and use cases.
However, having so many options introduces an important challenge: how do developers determine which combination of services is appropriate for their application?
For example:
  • Should a startup use serverless computing or container-based infrastructure?
  • When should a developer choose DynamoDB instead of RDS?
  • Is ECS sufficient, or does the application actually require Kubernetes with EKS?
  • Which services are appropriate for unpredictable traffic?
  • How can security, reliability, and cost optimization be evaluated before deployment?
These questions often require considerable research and architectural experience.
StackSage addresses this problem by translating project requirements into structured architecture recommendations and explaining why particular services are suitable.

2. What Is StackSage?

StackSage is a full-stack AWS architecture recommendation platform that combines a deterministic recommendation engine, AI-assisted project intake, interactive architecture diagrams, and infrastructure-as-code generation.
Users can explore the platform through three primary entry points:
  • Architecture Quiz: Answer questions about the application workload, operational preferences, traffic patterns, database requirements, and project stage.
  • Service Catalog: Explore and search a catalog of 25 AWS services.
  • Service Comparison: Compare AWS services across important architectural attributes.
Instead of requiring users to understand every AWS service before starting, StackSage provides a structured way to explore possible architectures.

3. AI-Powered Architecture Intake

One of the most useful features is natural-language project intake.
Users can describe their application in plain English rather than manually completing every quiz question.
For example:
"A food delivery application with 50,000 users, image uploads, PostgreSQL, unpredictable traffic, and a focus on keeping infrastructure costs low."
StackSage uses Google's Gemini API to extract five structured architectural parameters from the description.
These parameters are then passed to the same deterministic recommendation engine used by the manual quiz.
An important engineering decision here is that AI does not independently invent AWS services or generate the architecture diagram. Its responsibility is limited to understanding the user's requirements and extracting structured inputs.
This keeps the recommendation process consistent and makes the architecture decisions easier to test and explain.

4. Interactive Architecture Diagrams

Architecture recommendations become much more useful when developers can actually visualize how services connect.
StackSage generates interactive branching architecture diagrams instead of displaying services as a simple linear list.
For example, an application might have:
  • Amazon API Gateway as the API entry point.
  • AWS Lambda for serverless application processing.
  • Amazon RDS for relational data.
  • Amazon ElastiCache for caching.
  • Amazon S3 for object storage.
The diagram engine represents these relationships as a directed graph.
It calculates the layout of nodes and draws SVG connectors between them, allowing one compute component to connect to multiple supporting services.
Users can also export architecture diagrams as:
  • SVG files.
  • High-resolution PNG images.
  • Mermaid.js flowchart Markdown.
These exports make it easier to reuse architecture designs in technical documentation, GitHub repositories, presentations, and architecture discussions.

5. AWS Well-Architected Framework Evaluation

One of the central ideas behind StackSage is that an architecture should not only work; it should also be evaluated against established architectural principles.
StackSage evaluates recommendations using the six pillars of the AWS Well-Architected Framework:
  1. Operational Excellence
  1. Security
  1. Reliability
  1. Performance Efficiency
  1. Cost Optimization
  1. Sustainability
The evaluation is rules-based and considers the actual project requirements and recommended services.
For example, an application with unpredictable traffic using serverless computing may receive different evaluations from an application using manually scaled EC2 infrastructure.
The platform also provides an architectural pre-mortem and production failure-mode review.
It highlights potential operational challenges, including:
  • Lambda cold starts and concurrency limitations.
  • API Gateway integration timeout constraints.
  • RDS connection pool exhaustion.
  • DynamoDB hot partitions.
  • ElastiCache cache stampedes.
The objective is to encourage developers to think about failure scenarios and mitigation strategies before deploying an application.

6. Terraform Generation with Security in Mind

Another important feature is the Terraform scaffold generator.
Instead of asking an AI model to generate arbitrary infrastructure code, StackSage uses predefined, service-specific Terraform templates.
This was a deliberate engineering decision because infrastructure code can create real security and operational risks.
The supported templates cover services such as:
  • AWS Lambda
  • Amazon API Gateway
  • Amazon EC2
  • Amazon ECS
  • Amazon RDS
  • Amazon Aurora
  • Amazon DynamoDB
  • Amazon S3
  • Amazon CloudFront
  • Amazon ElastiCache
  • Amazon SQS and SNS
Security-conscious defaults are built into the generation process.
For example:
  • S3 buckets block public access.
  • RDS instances are not publicly accessible by default.
  • Database passwords are provided through required variables.
  • SSH CIDR ranges do not have permissive default values.
  • IAM permissions follow a least-privilege approach.
Complex services that require more extensive infrastructure planning are explicitly excluded rather than generating potentially unsafe boilerplate.
Generated Terraform is intended as a starting point for review, customization, and testing before applying it to a real AWS environment.

7. Technology Stack and System Architecture

StackSage uses a modern full-stack architecture.
Frontend
  • React 18
  • Vite
  • React Router
  • Custom SVG-based architecture visualization
Backend
  • Node.js
  • Express.js
  • REST APIs
  • JWT authentication
  • Bcrypt password hashing
Database
  • MongoDB Atlas
  • Mongoose
AI Integration
  • Google Gemini API
Testing and Reliability
  • Vitest
  • Playwright
  • Integration testing with an in-memory MongoDB
  • Pino structured logging
  • Optional Sentry error monitoring
The application separates its frontend, backend, recommendation engine, and data layer.
The recommendation engine handles architectural decisions, while the AI integration assists with natural-language understanding and catalog-grounded conversations.
The repository also includes a Render Blueprint and deployment instructions for deploying the backend and frontend.
Deployment clarification: The current application deployment uses Vercel, Render, and MongoDB Atlas. AWS services are the target services modeled and recommended by StackSage; the application does not claim to run its production infrastructure on AWS.

8. Engineering Challenges and Important Decisions

Building StackSage involved several interesting engineering challenges.
Keeping AI grounded: Generative AI can produce inconsistent recommendations. I addressed this by restricting AI to structured parameter extraction and catalog-grounded conversations.
Generating meaningful architecture diagrams: A simple linear diagram cannot accurately represent real application dependencies. I implemented a graph-based layout with branching nodes and SVG connectors.
Making Terraform generation safer: Generating infrastructure code requires careful defaults. Template-based generation and explicit exclusions help avoid unsafe or misleading configurations.
Maintaining reliability: The project includes unit, integration, and browser-based tests. Its Playwright end-to-end suite covers 72 tests across important user workflows.
Making recommendations explainable: Rather than returning only a list of services, the platform provides reasoning, trade-offs, Well-Architected evaluations, and potential production failure scenarios.

9. What I Learned

Building StackSage helped me explore several important areas of cloud and software engineering.
I learned that cloud architecture is fundamentally about making trade-offs rather than simply choosing the most powerful service.
I also gained practical experience with:
  • Designing deterministic recommendation systems.
  • Integrating generative AI into structured workflows.
  • Working with AWS architectural patterns.
  • Evaluating architectures against the AWS Well-Architected Framework.
  • Building interactive graph visualizations.
  • Generating security-conscious Terraform scaffolds.
  • Designing REST APIs and authentication workflows.
  • Writing unit, integration, and end-to-end tests.
  • Improving observability and application reliability.
Perhaps the most important lesson was that AI is most useful in architecture tooling when it supports engineering decisions rather than replacing the underlying rules, validation, and technical reasoning.

10. What's Next?

StackSage is an evolving project, and there are opportunities to expand it further.
Potential improvements include:
  • Integrating live AWS pricing information.
  • Adding more AWS services and architecture patterns.
  • Providing deeper security and reliability assessments.
  • Supporting more advanced multi-region architecture scenarios.
  • Expanding infrastructure generation and validation.
  • Exploring deployment integrations with AWS services.
These improvements could make StackSage an even more useful companion for developers learning cloud architecture and engineers planning real-world applications.

Conclusion

StackSage was built around a simple idea: cloud architecture decisions should be understandable, explainable, and easier to evaluate.
By combining structured recommendations, AI-assisted intake, interactive architecture diagrams, AWS Well-Architected evaluations, service comparisons, and Terraform scaffolding, the platform brings several important parts of the architecture design process into one workspace.
It is not intended to replace experienced cloud architects or official AWS documentation. Instead, it provides a practical starting point for exploring architectural options, understanding trade-offs, and identifying potential problems earlier.
I built StackSage to make cloud architecture more approachable while keeping engineering fundamentals, security, and reliability at the center of the process.
Feedback, suggestions, and contributions are welcome!
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article