An AI-powered document-processing system built using Amazon Textract, AWS Lambda, Amazon Bedrock/SageMaker, and a serverless cloud-native architecture.
This application extracts text from PDFs/images, generates intelligent summaries, and enables question-answering using Retrieval-Augmented Generation (RAG).
- Upload PDFs or images
- Extracts structured text using Amazon Textract
- Supports multi-page documents
- Automated text summarization
- TL;DR bullet generation
- Powered by Amazon Bedrock or SageMaker JumpStart models
- Ask natural-language questions about the uploaded document
- Uses RAG (chunking + embeddings + context retrieval)
- Generates accurate responses using LLMs
- No servers to manage
- Highly scalable
- Low-cost for student projects
ββββββββββββββββββββββββββββ
β Frontend β
β (React + Amplify) β
ββββββββββββββ¬ββββββββββββββ
β
βΌ
ββββββββββββββ
β API Gatewayβ
ββββββββ¬ββββββ
β
βββββββββββββββΌββββββββββββββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββββ ββββββββββββββββββ ββββββββββββββββββ
β Upload Handler β β OCR Lambda β β Q/A Lambda β
βββββββββ¬βββββββββ βββββββββ¬βββββββββ βββββββββ¬βββββββββ
β β β
βΌ βΌ βΌ
βββββββββββββ ββββββββββββββββ ββββββββββββββββ
β S3 Upload β β Textract OCR β β LLM Summary β
βββββββ¬ββββββ βββββββ¬βββββββββ βββββββ¬βββββββββ
β β β
βΌ βΌ βΌ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββ
β Raw Text S3 β β DynamoDB Metaβ β Bedrock/SageMakerβ
ββββββββββββββββ ββββββββββββββββ ββββββββββββββββββ
smart-document-analyzer/
β
βββ backend/
β βββ textract-handler.py # OCR + text extraction Lambda
β βββ nlp-processor.py # Summarization + embeddings
β βββ query-handler.py # Q/A Lambda function
β βββ utils/ # Helper scripts
β
βββ frontend/
β βββ src/ # React frontend
β βββ public/
β βββ package.json
β
βββ infrastructure/
β βββ cdk/ or cloudformation/ # Infra as code
β βββ iam-policies/
β
βββ docs/
β βββ architecture.png
β βββ demo-screenshots/
β βββ samples/
β
βββ README.md
βββ LICENSE
git clone https://github.com/<your-username>/smart-document-analyzer.git
cd smart-document-analyzerpip install -r backend/requirements.txtaws configureMake sure your IAM user has permissions for:
- S3
- Lambda
- Textract
- DynamoDB
- Bedrock / SageMaker
- API Gateway
Using AWS CDK:
cd infrastructure/cdk
cdk deploycd frontend
npm install
npm startUser uploads a PDF/image β sent to S3 via pre-signed URL.
S3 event triggers a Lambda function:
- Calls Amazon Textract
- Extracts text
- Saves cleaned text to S3
A second Lambda:
- Chunks text
- Generates embeddings
- Creates summary using LLM
- Saves metadata to DynamoDB
User provides a question:
- System retrieves relevant text chunks (RAG)
- LLM generates the best answer
| Method | Endpoint | Description |
|---|---|---|
| POST | /upload |
Generates pre-signed S3 upload URL |
| GET | /status/{docId} |
Returns processing status + summary |
| POST | /ask/{docId} |
Answers questions about the document |
To stay within student credits ($199.78):
- Use Textract on small PDFs (β€ 5 pages)
- Delete SageMaker endpoints when not in use
- Prefer Bedrock for serverless LLM inference
- Enable S3 lifecycle rules to auto-delete temporary files
- Enable Billing alerts
Place images under docs/demo-screenshots/ and include examples here:



- React
- AWS Amplify
- AWS Lambda
- Amazon API Gateway
- Amazon S3
- Amazon DynamoDB
- Amazon Textract
- Amazon Bedrock
or - AWS SageMaker JumpStart
Contributions, issues, and feature requests are welcome!
Feel free to open a PR or fork the project.
This project is licensed under the MIT License.
See the LICENSE file for full details.
SriSaiKiran Tambalkar
B.Tech CSE (AIML) Student
GitHub: https://github.com/
LinkedIn: https://www.linkedin.com/in