← Back to Portfolio

Project 5: An AI-Powered Sentiment Analysis API

Integrating a serverless API with Amazon Comprehend to perform real-time natural language processing.


The Goal

The goal of this project was to build an intelligent API that could analyze the sentiment of any given text. This demonstrates the power of integrating AWS's pre-trained AI models into a serverless application, allowing for sophisticated analysis without building or training any models from scratch.

The Architecture

This project builds upon the serverless API pattern, swapping the database for a managed AI service. The entire architecture is event-driven and requires zero server management.

AI Sentiment Analysis API Architecture Diagram

Key components include:

The Test: Analyzing Text in Real Time

After deploying the API, I tested it using the `curl` command-line tool. I sent various text samples (positive, negative, and neutral) in a `POST` request and successfully received a JSON response containing the correct sentiment and confidence scores, proving the end-to-end integration was working perfectly.