Building a Real-Time Feedback Analyzer with Amazon Comprehend and OutSystems
- Charos Abdukayumova
- May 9
- 5 min read
User feedback is a constant stream of opinions, emotions, and expectations, and without structure, it often becomes noise. Instead of letting valuable insights get buried in raw text, I wanted to design a solution that could automatically detect sentiment from written input and surface meaningful signals in real time.
This project combines OutSystems, Amazon Comprehend, and API Gateway to deliver a simple, serverless pipeline that transforms raw feedback into categorized sentiment (positive, negative, neutral, or mixed). It’s lightweight, scalable, and fits neatly into low-code environments.
What is Amazon Comprehend?
Amazon Comprehend — A natural language processing (NLP) service that extracts insights from text like sentiment, key phrases, and entities. In other words, it is a natural language processing (NLP) service that reads text and pulls out useful insights. It can detect sentiment, key phrases, language, entities (like names or places), and more. If you want to turn raw text into something actionable (like tagging feedback or analyzing reviews), this is the tool.
What will be covered?
Architectural Overview
Why This Architecture?
Set up IAM
Set up Lambda
Set up API Gateway
Set up integration in OutSystems
Summary
☁️ Architectural Overview
The system consists of four main components:
OutSystems: Captures user input and triggers a REST call.
API Gateway: Exposes a secure HTTP endpoint.
AWS Lambda: Handles the request and invokes the Comprehend service.
Amazon Comprehend: Analyzes sentiment and returns structured scores.

OutSystems receives the response, deserializes the data, and displays sentiment and score distribution. The result can be used for visual feedback, escalation logic, or trend tracking.
✅ Why This Architecture?
This setup was chosen for a few key reasons:
Benefits
Serverless & scalable: No infrastructure to maintain.
Low-friction integration: REST endpoint simplifies OutSystems consumption.
Cost-effective: Comprehend, Lambda, and API Gateway are free-tier friendly.
Secure: Credentials remain in AWS; no need to expose keys or handle signature auth in the front end.
Why Not Other Options?

Amazon Comprehend was the most balanced choice, providing just enough intelligence, clarity, and integration simplicity without unnecessary complexity or cost.
Cost (as of 2025)
Free tier: 50K units/month for 12 months
Pay-as-you-go: $1.00 per 1000 units (one unit = 100 characters)
So 1,000 feedbacks of ~500 characters = ~$5.
Let’s get started =)
🔐 Set up IAM
What is IAM?
AWS IAM — A service that controls who can access your AWS resources and what actions they’re allowed to take. It helps you securely manage who can access your AWS services and what actions they can perform. Think of it as your permissions control panel — you create users, assign roles, and define what each one is allowed to do. It’s how you make sure the right people (or services) have access to the right resources.
Go to your console and search for IAM.

From the opened screen, select roles and click the Create role button.

After, select Lambda as a service and click Next.

We should add 2 policies for this role: ComprehendFullAccess and AWSLambdaBasicExecutionRole. Click the Next button.

Finally, give a name for your role and click save.

That was all for IAM. Next, let’s configure Lambda!
📊 Set up Lambda
What is Lambda?
AWS Lambda — A serverless compute service that runs your code automatically in response to events. It lets you run your code without worrying about servers. Just write your function, deploy it, and AWS runs it when needed — whether that’s responding to an API call, processing uploaded files, or handling real-time data. You only pay for what you use, making it perfect for small, efficient tasks.
From the search bar, search Lambda.

Select the Create a function button from the opened menu.

Give a name for your function and select Python 3.12 from the Runtime dropdown.

On the same screen, expand the Change default execution role block, and select Use existing role and choose your earlier created role.

Now copy and paste the below given code, and click the Deploy button.


We finished with Lambda. Let’s jump to the API Gateway.
🚪 Set up API Gateway
What is an API Gateway?
Amazon API Gateway — A fully managed service for creating and managing APIs that act as a bridge between users and your backend services. API Gateway acts as the front door for your application’s APIs. It helps you create, manage, and secure REST or WebSocket APIs that connect to services like Lambda or backend systems. You can control access through API requests.
In the search bar, type API Gateway.

In the opened screen, click Create an API.

Now select Rest API.

Give a name for your API and click the Create API button.

When your API is created, add a new POST method by selecting your Lambda function.

Finally, deploy your API. Make sure you copied your API address after deployment (we will be using it in OutSystems)

We covered all AWS parts, let’s jump to OutSystems.
🎛️ Set up integration in OutSystems
Open your application and create a new Consume Rest API connection.

From here, put your API, and test with the below given body and headers.

Your API should have Request and Response variables.

Finally, create a Client Action for deserializing the API response body (in the other case, the result will look strange because body the response contains a JSON string inside a JSON object, meaning it’s double-encoded). The Postman response example without deserializing is given below:


You can see the result of integration in the video below.
🧵 Summary
This project explored how lightweight cloud tools can bring meaningful intelligence to user feedback workflows. By combining OutSystems with Amazon Comprehend behind an API Gateway and Lambda layer, it’s possible to build a real-time sentiment classification system that is scalable, maintainable, and affordable.
For teams working in low-code environments or handling multilingual feedback at scale, this pattern offers a practical, production-ready approach, with clear integration points and low operational burden.
Let me know your solutions for sentiment analysis.