If you are prepping for an AWS certification, you know the pain: a desktop cluttered with screenshots, questions lost in forgotten folders, and highlighted PDFs that look like a detective abandoned the case. Vania Devโ€™s latest project, AWS Exam Questions AI, solves this by building a serverless pipeline that ingests exam question images and outputs structured, searchable study notes directly into Notion.

The Serverless Stack

The architecture is a masterclass in event-driven design. It relies on five core AWS services working in harmony. Amazon S3 acts as the ingestion bucket for your screenshots. When a file lands, it triggers an AWS Lambda function. This function calls Amazon Textract to perform OCR, extracting raw text from the image. That text is then passed to Amazon Bedrock, where a generative AI model parses the question, identifies the correct option, and generates an explanation in Spanish. Finally, the data is pushed to Notion via API.

IAM Least Privilege in Practice

Security is not an afterthought here. The project enforces strict IAM policies. The Lambda execution role is limited to specific actions: s3:GetObject, textract:DetectDocumentText, and bedrock:InvokeModel. There is no blanket admin access. This granular approach ensures that if the function is compromised, the blast radius is contained to read-only S3 access and specific AI invocation capabilities. For developers building similar pipelines, this is the standard you should aim for.

Code Structure and Dependencies

The repository is organized for maintainability. main.py serves as the Lambda entry point, while aws_question_agent.py handles the orchestration logic. Utility modules for OCR, LLM interaction, and Notion integration are isolated in the utils/ directory. The stack leans heavily on boto3 for AWS interactions and langchain-aws to bridge Bedrock. Notably, it uses PyToNotion for the final data persistence, ensuring the output format matches Notionโ€™s block structure requirements.

Builder Warnings

Automation is powerful, but it is not infallible. The author explicitly notes that AI models can hallucinate, especially with nuanced multiple-choice questions. You must validate the generated JSON before it hits Notion to prevent schema mismatches. Furthermore, Textract accuracy is directly tied to input image quality; blurry screenshots will propagate errors downstream. This tool is designed to accelerate your study workflow, not replace your critical thinking.

Key Takeaways

  • Event-Driven Efficiency: S3 triggers Lambda, which orchestrates Textract and Bedrock without a persistent server.
  • Strict IAM Policies: Functions are scoped to s3:GetObject and bedrock:InvokeModel to minimize security risks.
  • Notion Integration: Uses PyToNotion to create structured, searchable study blocks rather than raw text dumps.
  • Human-in-the-Loop: AI-generated answers must be verified against official AWS documentation.

The Bottom Line

This is exactly the kind of practical, infrastructure-focused tooling that makes sense. It stops you from drowning in screenshots and starts you studying with structured data. If you are already in the AWS ecosystem, this pipeline is a low-friction way to automate your certification prep.