π§ AI-Powered Text Summarizer (Serverless on AWS)
π Project Overview The AI Summarizer is a fully serverless, scalable application that generates intelligent and concise summaries of input text using Amazon Bedrock. To optimize performance and minimize redundant AI calls, results are cached using DynamoDB. The solution exposes a REST API using API Gateway, and provides an interactive React.js frontend hosted via AWS Amplify.
β Key Features π AI-Powered Summarization using Amazon Bedrock foundation models (e.g.Titan). π οΈ Fully Serverless architecture built with AWS Lambda and API Gateway. β‘ Low Latency Caching with DynamoDB to avoid repeated calls for the same input. π CORS-Enabled REST APIs for seamless frontend-backend communication. π» React.js Frontend with real-time input/output interaction. π¦ Infrastructure as Code (IaC) using AWS CloudFormation.
ποΈ Architecture Diagram [React.js Frontend] | βΌ [API Gateway (REST)] | βΌ [AWS Lambda Function] | βββ Check DynamoDB for Cached Summary βββ If Not Found β Call Amazon Bedrock (Titan.) | βΌ Save Summary in DynamoDB β Return to Frontend
Amazon Bedrock ----> AI/ML summarization using foundation models AWS Lambda ----> Backend business logic (Python) API Gateway ----> Secure RESTful endpoints Amazon DynamoDB ---> Caching layer for summarized content React.js ----> Frontend user interface AWS Amplify ---> Hosting for React frontend CloudFormation ---> IaC to provision the infrastructure
βοΈ Prerequisites Before you begin, ensure you have the following installed:
β An AWS Account β AWS CLI installed and configured β Node.js and npm installed (for React frontend) β Python 3.x installed (for Lambda backend) β Basic permissions to use Amazon Bedrock, Lambda, API Gateway, and DynamoDB
π§ͺ How It Works User inputs text in the React app. The input is sent via API Gateway to a Lambda function. Lambda checks DynamoDB for a cached summary. If not found, it calls Amazon Bedrock for summarization. The summary is stored in DynamoDB and returned to the user.
π Project Structure aws-ai-text-summarizer/ βββ frontend/ # React.js frontend βββ infrastructure/ # Infrastructure as Code (IaC) templates β βββ amplify.yaml # Amplify β βββ apigateway.yaml # API Gateway configuration β βββ dynamodb.yaml # DynamoDB table definition β βββ iam.yaml # IAM roles and policies β βββ lambda.yaml # Lambda function resources βββ deployment_steps/ # Steps for Deployment βββ README.md # Project overview and usage
βοΈ Author Utkarsh Rastogi AWS Community Builder π