Ever wanted to collect product feedback in real-time without managing a single server? This guide walks you through building a complete serverless feedback and rating system using AWS — powered by Lambda, DynamoDB, API Gateway, and CloudFormation!
🌟 The Problem
In the digital age, user feedback is gold.
Whether you're building a SaaS product, running a blog, or launching a mobile app — understanding your users helps shape better experiences. But traditional feedback systems often involve:
- Managing EC2 instances
- Scaling backend services
- Writing complex logic for real-time updates
This can be costly, time-consuming, and a real dev productivity killer.
✅ The Solution
What if you could:
- Collect real-time feedback through a REST API?
- Instantly update ratings and analytics as new data arrives?
- Never manage a server again?
That’s where AWS Serverless shines.
This project demonstrates how to build a fully serverless feedback and rating system using:
- API Gateway to receive feedback via HTTP
- AWS Lambda to process logic
- DynamoDB to store feedback and stats
- DynamoDB Streams to update analytics in real-time
- CloudFormation to deploy everything in minutes
🧠 System Architecture
Here's the high-level architecture for our feedback engine:
Each piece works together to ensure new ratings update live stats — and it scales automatically.
🛠️ Core AWS Services Used
Service | Purpose |
---|---|
API Gateway | Expose REST endpoints |
AWS Lambda | Stateless logic execution |
Amazon DynamoDB | Store feedback and rating summaries |
DynamoDB Streams | Trigger real-time updates on data changes |
Amazon CloudWatch | Monitor and debug logs |
AWS IAM | Manage permissions securely |
🚀 Why CloudFormation?
To make the system reproducible and portable, we define all resources in YAML using AWS CloudFormation.
Benefits:
- 💡 No manual setup — automate everything
- 🔁 Consistent environments (Dev, QA, Prod)
- ⚙️ CI/CD ready from Day 1
🔄 Feedback Lifecycle in Action
1️⃣ Submitting Feedback
- A user calls the
submitfeedback
API. - Lambda validates input and stores it in FeedbackTable.
- Record includes
productId
,userId
,rating
, andcomment
.
2️⃣ Real-Time Rating Update
- New entry in DynamoDB triggers a Stream Event.
- Stream invokes a second Lambda.
- It updates
FeedbackRatingStatsTable
by:- Adding new rating to the total
- Incrementing feedback count
- Calculating new average
3️⃣ Deleting Feedback (with Auto-Recalculation)
-
deletefeedback
API deletes feedback. - Stream triggers stats recalculation.
- If it was the last feedback for that product → stats entry is removed.
4️⃣ Retrieving Feedback and Stats
- Use
getfeedback
to get raw feedback per product. - Use
getratingsummary
to fetch average ratings and feedback counts.
📷 Sample Outputs
✅ submitfeedback
Submits a new feedback entry via API and stores it in DynamoDB.
✅ FeedbackTable
View of the DynamoDB table storing raw feedback entries.
✅ FeedbackRatingStatsTable
Aggregated ratings and counts per product stored in a separate table.
✅ getratingsummary
API output showing the calculated average rating and feedback count.
✅ getfeedback
Returns user feedbacks for a specific product ID.
✅ deletefeedback
Removes a user's feedback and automatically updates the statistics.
✅ Conclusion
This serverless rating and feedback system showcases how AWS services like Lambda, DynamoDB, API Gateway, and DynamoDB Streams can be seamlessly integrated to build a scalable, cost-effective, and fully managed solution with zero backend maintenance.
By leveraging stream-based triggers, the system updates rating statistics in real time while storing and processing feedback through simple APIs. Its support for real-time analytics, auto-scaling, and decoupled logic makes it ideal for modern apps that require lightweight yet powerful backend functionality.
Deployed with AWS CloudFormation, the system is reproducible across environments and extensible for use cases like:
- Product reviews
- Course ratings
- Customer satisfaction systems
- Event feedback forms
👨💻 About Me
Hi, I’m Utkarsh Rastogi, an AWS Community Builder and passionate cloud specialist. I love creating scalable cloud-native applications using serverless technologies and writing about them to help others in their cloud journey.
📚 I regularly share hands-on AWS projects, automation tips, and IaC templates.
🔗 Explore the full source code here:
👉 GitHub – Serverless Feedback System
✍️ More AWS projects & blogs:
🌐 awslearner.hashnode.dev
💼 Connect on LinkedIn:
🔗 Utkarsh Rastogi
Top comments (1)
Thanks Utkarsh