When Generative AI Meets AWS Community Builders: AWS Cost Advisor
An adapted deep dive into an AI hackathon project that combines RAG, AWS SageMaker, LangChain, and FAISS to improve cloud cost optimization guidance.

Original publication
This post is adapted from the original DEV Community article: When Generative AI meets AWS Community Builders : Unveiling the Ultimate AWS Cost Advisor
Why this project stood out
The team tackled a real FinOps pain point: cloud billing tools often expose lots of controls, but users still struggle to get direct, relevant answers to practical cost questions.
The project goal was to build a Q and A assistant that gives useful cost-optimization guidance instead of generic LLM responses.
Problem they addressed
A plain text-generation assistant was not reliably answering AWS cost questions with enough precision. In many cases, answers were vague or off-topic.
The solution introduced a retrieval-augmented architecture so responses could be grounded in trusted cost-management knowledge.
Solution architecture
The implementation combined:
- SageMaker-hosted Hugging Face models for generation.
- LangChain retrieval QA patterns for query-to-context matching.
- FAISS as a vector store for fast semantic document retrieval.
- AWS Cost Management FAQ content as the primary knowledge base.

What improved with RAG
The article demonstrates a direct comparison between a generic assistant and the RAG-based flow. For questions like how to get started with AWS Cost and Usage Reports, the RAG path returned concise, actionable guidance aligned with AWS billing workflows.
This is a strong pattern for enterprise AI systems: retrieval first, generation second.
Engineering takeaways
- Domain grounding matters more than fluent text output.
- Retrieval quality drives final answer quality in cost-advisor scenarios.
- A focused knowledge base can outperform larger but ungrounded model behavior.
- Combining architecture expertise with AI patterns can unlock immediate operational value.
Broader relevance
Even though this started as a hackathon side project, the design pattern is production-relevant for internal assistants, support tooling, and FinOps enablement workflows.
For teams building similar systems, this post is a useful reference for balancing LLM capability with accuracy, trust, and practical outcomes.
Read more
- Original post: AWS Cost Advisor CB AI Hackathon
- Referenced code repository: aws-cost-advisor on GitHub
Related posts

Weekend Productivity Challenge: PriorityLens and AI-Driven Focus
Building a serverless productivity app that uses Amazon Bedrock to classify tasks by urgency and importance, then suggest a practical daily top three.

What I Learned from AWS Cloud Quest: Recertify Cloud Practitioner
Eight practical infrastructure lessons from AWS Cloud Quest, covering reliability, scaling, networking, databases, and cost-aware operations.

Recap of Werner Vogels Keynote at re:Invent 2023
A practical recap of the Frugal Architect laws and the keynote lessons on cost-aware, sustainable, and resilient system design.