AWS Builder Center
Building a Campus Study Assistant with Amazon Bedrock (Part 1: Model Setup & Model Connectivity)

Building a Campus Study Assistant with Amazon Bedrock (Part 1: Model Setup & Model Connectivity)

Here's how I set up Amazon Bedrock and Python to start analyzing my coursework.

Series: Building a Campus Study Assistant with Amazon Bedrock (3 articles)

  1. 1
    Building a Campus Study Assistant with Amazon Bedrock (Part 1: Model Setup & Model Connectivity) This article
As an IT student balancing dense course syllabi and technical material, I wanted to automate how I extract key concepts from study materials. Instead of reading through 40-page PDFs manually, I decided to build a customized document analyzer using Amazon Bedrock. In this first part, I will walk you through how I connected Python to Bedrock via Boto3 to lay the foundation for my campus study assistant.

Choosing the Model & Configuring My Environment

Verifying active model access for Anthropic Claude Haiku in the AWS Bedrock Console.

I chose Anthropic Claude 4.5 Haiku in the Amazon Bedrock Console as the core engine. Haiku is built for low latency and high cost-efficiency, making it super responsive for document summarization and key-concept extraction without running up a high cloud bill while I prototype.
In my VS Code workspace, I installed  boto3  and  awscli  to handle the backend integration. I configured my local setup using  aws configure  in the terminal, which securely saved my access credentials on my machine so I didn't have to hardcode keys into my repository.
Script:
pip install boto3 awscli aws configure

Writing the Script & Testing API Integration

I wrote a quick test script to initialize the  bedrock-runtime  client, pointing it to the active Claude Haiku inference profile ( us.anthropic.claude-haiku-4-5-20251001-v1:0 ). To test how it handled academic questions, I sent a sample prompt comparing SQL and NoSQL architectures packaged inside an Anthropic Messages API payload using  bedrock.invoke_model() .
Results & Key Lessons Learned
Successful API response generated from Claude Haiku printed directly to the terminal.

When I ran the script, Claude sent back a clean, well-formatted breakdown of data structures, scalability, and query syntax straight to my terminal output.
Getting to that working output taught me two quick troubleshooting lessons along the way:
  1. Indentation logic: I had to fix my main execution block (if name == "main":), moving it out of the function body to the root level so Python would execute the code automatically when run.
  1. Inference Profile Updating: My initial calls threw a ResourceNotFoundException because I was using a deprecated model ID. Updating the string to the active regional inference profile ID in the console resolved the access permissions instantly.

🔗 Relevant Resources & Further Reading

With a functional script and verified connectivity, my base engine is ready. In Part 2, I'll be extending this script to parse full multi-page PDF and DOCX lecture notes to generate automated study guides.

Series: Building a Campus Study Assistant with Amazon Bedrock (3 articles)

  1. 1
    Building a Campus Study Assistant with Amazon Bedrock (Part 1: Model Setup & Model Connectivity) This article
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