AWS Builder Center
Weekend Annoying Task Challenge:  GradeGhost

Weekend Annoying Task Challenge: GradeGhost

GradeGhost is an AI-powered grading assistant built with Amazon Bedrock, Lambda, and DynamoDB that turns hours of repetitive assignment grading into minutes — providing consistent scores and detailed feedback against any rubric.

Assistant Professor | AI, Cloud Computing & IoT | AWS Builder

Vision & What the App Does

As a university professor teaching Electronics and Communication Engineering, one of my most time-consuming and mentally draining tasks is grading student assignments. With 60+ students per class, grading a single batch of assignments takes 8–10 hours — not because the content is difficult to evaluate, but because providing consistent, detailed, and personalized feedback for every student is exhausting.
GradeGhost is an AI-powered grading assistant that automates this exact pain point. Teachers upload a rubric (grading criteria with point allocations) and paste a student's answer. GradeGhost uses Amazon Bedrock's Nova Pro model to:
  • Generate a numeric score and letter grade aligned to the rubric
  • Provide detailed, criterion-by-criterion feedback
  • Identify specific strengths in the student's work
  • Suggest actionable areas for improvement
  • Maintain grading history for consistency across submissions
GradeGhost doesn't replace the teacher — it acts as a first-pass grading assistant. The teacher reviews AI-generated grades, adjusts where needed, and approves. What previously took 8 hours now takes under 1 hour.



How I Built It

Development Process

I started by identifying the core workflow: Rubric + Student Answer → AI Analysis → Structured Grade + Feedback. The key decision was using a structured JSON output format so the frontend could render feedback cleanly without parsing free-form text.
Key decisions:
  1. Amazon Bedrock Nova Pro as the grading engine — it handles nuanced academic evaluation well and supports structured JSON responses
  1. Serverless architecture — Lambda + API Gateway means zero infrastructure management and pay-per-use pricing (perfect for a tool used during grading periods)
  1. Single-page frontend — no build tooling needed; vanilla HTML/CSS/JS hosted on S3 keeps deployment simple
  1. DynamoDB for persistence — stores both rubrics (reusable across assignments) and grading history (for consistency auditing)

Challenges & Solutions

Challenge 1: Consistent JSON output from LLM The AI sometimes wrapped responses in markdown code blocks. I added parsing logic that strips  json  wrappers and handles both clean JSON and markdown-wrapped JSON responses.
Challenge 2: Prompt engineering for fair grading Early prompts produced overly generous grades. I refined the system prompt to explicitly evaluate against each rubric criterion independently, which produced more calibrated scores.
Challenge 3: Cold start latency Lambda cold starts + Bedrock inference can take 5–10 seconds. I added a loading state in the UI with time estimates so users know the system is working.



AWS Services Used / Architecture Overview

┌──────────────────┐ ┌─────────────────┐ ┌──────────────────────┐
│ Frontend │────▶│ API Gateway │────▶│ AWS Lambda │
│ (S3 Static) │ │ (REST API) │ │ (Python 3.12) │
│ │ │ │ │ - grade_assignment │
│ │ │ POST /grade │ │ - get_grades │
│ │ │ GET /grades │ │ - manage_rubrics │
│ │ │ POST /rubrics │ │ │
└──────────────────┘ └─────────────────┘ └───────────┬──────────┘
│
┌─────────▼──────────┐
│ Amazon Bedrock │
│ (Nova Pro v1) │
└─────────┬──────────┘
│
┌─────────▼──────────┐
│ Amazon DynamoDB │
│ - GradeGhost- │
│ Grades │
│ - GradeGhost- │
│ Rubrics │
└────────────────────┘

AWS Service
Role
Free Tier
Amazon Bedrock (Nova Pro)
AI grading engine — analyzes answers against rubrics
New account credits
AWS Lambda (Python 3.12)
Three serverless functions for grading, history, and rubric management
1M requests/month free
Amazon API Gateway
REST API with CORS support
1M calls/month free
Amazon S3
Static website hosting for the frontend
5GB free
Amazon DynamoDB
Two tables storing grades and reusable rubrics (PAY_PER_REQUEST)
25GB free
How the agent is triggered: The user submits an assignment through the web frontend. A POST request hits API Gateway, which invokes the  GradeGhost-GradeAssignment  Lambda function. The function constructs a grading prompt, calls Bedrock Nova Pro, parses the structured JSON response, persists the result to DynamoDB, and returns the grade to the user.
Deployment: The entire infrastructure is defined as Infrastructure-as-Code using AWS SAM (template.yaml). A single  sam deploy  command provisions all resources. GitHub Actions CI/CD is configured for automatic deployments on push to main.



What I Learned

  1. Amazon Bedrock is surprisingly easy to integrate — the  invoke_model  API with Nova Pro feels like calling any REST endpoint. The hardest part was prompt engineering, not infrastructure.
  1. SAM CLI makes serverless deployment trivial — defining Lambda functions, API Gateway, and DynamoDB in a single YAML file and deploying with one command is a massive productivity boost compared to clicking through the Console.
  1. Structured output from LLMs requires defensive parsing — you can't assume the model will always return clean JSON. Building in fallback parsing (handling markdown code blocks, trailing text) made the system robust.
  1. Serverless is perfect for academic tools — I only need this during grading periods (a few weeks per semester). Pay-per-use means near-zero cost when not in use, unlike running an EC2 instance 24/7.
  1. Starting simple wins — I initially planned to add PDF upload, batch grading, and student login. By focusing on the core workflow (paste answer → get grade), I shipped a working tool in one weekend that I'll actually use next semester.



Link to App & Repo


  • 

  • 

  • 
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article