Listen to this Post
This article explores a serverless Gen AI quiz application built with AWS services. The app takes a PDF file or YouTube video as input and generates questions about the content using AWS Bedrock and GenAI.
You Should Know:
Key AWS Services Used:
1. AWS Bedrock – For generative AI capabilities.
2. AWS Lambda – Serverless compute for processing.
3. Amazon S3 – Storage for uploaded PDFs.
- Amazon API Gateway – REST API for frontend interaction.
- Amazon DynamoDB – Database for storing quiz data.
Steps to Replicate the Project:
1. Set Up AWS Bedrock:
aws bedrock create-model-customization-job \ --job-name "quiz-gen-ai" \ --base-model-identifier "anthropic.claude-v2" \ --training-data-uri "s3://your-bucket/training-data.json" \ --output-data-config "S3OutputLocation=s3://your-bucket/output/"
2. Deploy a Lambda Function for Processing:
import boto3
def lambda_handler(event, context):
bedrock = boto3.client('bedrock')
response = bedrock.invoke_model(
modelId='anthropic.claude-v2',
body=json.dumps({"prompt": "Generate quiz questions from this text..."})
)
return response
3. Configure API Gateway:
aws apigateway create-rest-api --name "QuizGenAPI"
4. Store Data in DynamoDB:
aws dynamodb create-table \ --table-name QuizQuestions \ --attribute-definitions AttributeName=id,AttributeType=S \ --key-schema AttributeName=id,KeyType=HASH \ --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5
5. Test the Application:
- Upload a PDF to S3.
- Trigger the Lambda via API Gateway.
- Retrieve generated questions from DynamoDB.
Expected Output:
A fully automated quiz generator that processes documents/videos and outputs AI-generated questions.
What Undercode Say:
This project demonstrates the power of AWS serverless and AI services in building scalable applications. By combining Bedrock, Lambda, and DynamoDB, developers can create intelligent systems without managing infrastructure.
Additional Useful Commands:
- Check Bedrock Models:
aws bedrock list-foundation-models
- Monitor Lambda Logs:
aws logs tail /aws/lambda/QuizGenerator --follow
- DynamoDB Query:
aws dynamodb scan --table-name QuizQuestions
Reference: towardsaws.com
Expected Output:
A functional AI-powered quiz generator deployed on AWS.
References:
Reported By: Darryl Ruggles – Hackers Feeds
Extra Hub: Undercode MoN
Basic Verification: Pass ✅



