AWS Builder Center
Weekend Annoying Task Challenge: MedMinder - AI That Turns Prescription Chaos Into Smart Medicine Reminders in Seconds

Weekend Annoying Task Challenge: MedMinder - AI That Turns Prescription Chaos Into Smart Medicine Reminders in Seconds

AI-powered medicine reminder app that automatically extracts prescription details using AWS Bedrock + sends automated reminders via EventBridge. Built for AWS Weekend Challenge.

Vision & What the App Does

As someone who manages multiple medications daily, one of my most frustrating challenges is remembering when to take each medicine. With 3-4 different medications, each with different schedules (morning, afternoon, night), it's easy to miss doses. Missing even one dose can have serious health consequences.
According to the World Health Organization,Β medication non-adherence accounts for 50% of treatment failures and approximately 125,000 preventable deaths annually in the United States alone. This isn't just an inconvenience β€” it's a public health crisis.
MedMinder is an AI-powered medicine reminder app that automates this exact pain point.Β Users upload a prescription image (photo of a bill, prescription paper, or medicine bottle), and the AI instantly:
  • Extracts all text from the prescription using Amazon Bedrock's multimodal AI
  • Identifies the medicine name, dosage, frequency, and duration
  • Automatically categorizes the medicine (morning, afternoon, night)
  • Stores everything in a searchable, filterable dashboard
  • Sends automated email reminders at scheduled times (8:00 AM and 9:00 PM IST)
  • Allows one-click "Mark as Taken" to track adherence
  • Syncs all data to the cloud for persistence across devices
MedMinder doesn't require manual data entryΒ β€” it acts as an intelligent prescription scanner. Upload a prescription photo, and within 15 seconds you have a fully categorized medicine entry with automated reminders. What previously took manual spreadsheet work now takes zero effort. Just snap a photo and let AI handle the rest.

ο»Ώ

How I Built It

Development Process

I started by identifying the core workflow:
Prescription Image β†’ AI Text Extraction β†’ Medicine Analysis β†’ Structured Data β†’ Dashboard Display β†’ Automated Reminders
The key architectural decision was usingΒ Amazon Bedrock's Nova Lite modelΒ for multimodal prescription analysis combined withΒ EventBridge for scheduled remindersΒ to handle the full pipeline from raw image to structured, categorized data with automated notifications.

Key Decisions

  1. Amazon Bedrock Nova Lite for multimodal AIΒ β€” It handles prescription images, medicine bottles, and handwritten notes remarkably well, extracting medicine details with high accuracy. The model returns clean structured JSON when prompted correctly.
  1. EventBridge for scheduled remindersΒ β€” Instead of polling or manual triggers, EventBridge cron rules automatically invoke the reminder Lambda at 8:00 AM and 9:00 PM IST, eliminating infrastructure complexity.
  1. Serverless architectureΒ β€” Lambda + DynamoDB means zero infrastructure management and pay-per-use pricing (perfect for a health app that's used daily but not continuously).
  1. Lambda Function URLsΒ β€” Direct HTTPS endpoints for API calls without needing API Gateway, simplifying the architecture and reducing latency.
  1. Amazon SES for email deliveryΒ β€” Sends beautifully formatted HTML emails with medicine lists, special instructions, and dosage information.
  1. DynamoDB with on-demand capacityΒ β€” Stores all medicine records and user emails with PAY_PER_REQUEST billing, meaning zero cost when not in use.
  1. Single-page frontendΒ β€” No build tooling needed; vanilla HTML/CSS/JavaScript hosted on S3 keeps deployment simple and fast.
  1. Local storage + cloud syncΒ β€” Frontend stores data locally for instant access, while Lambda syncs to DynamoDB for persistence and reminder processing.

ο»Ώ

Challenges & Solutions

Challenge 1: Accurate Medicine Extraction from Varied Prescription Formats

Problem:Β Prescriptions come in many formats β€” printed pharmacy receipts, handwritten doctor notes, medicine bottle photos, and digital screenshots. Early attempts struggled with inconsistent formatting.
Solution:Β I refined the Bedrock prompt to explicitly ask for structured JSON output with specific fields (name, dosage, frequency, duration, notes). The model now handles all prescription formats consistently, extracting only the relevant medicine information.

Challenge 2: Consistent JSON Output from LLM

Problem:Β The AI sometimes wrapped responses in markdown code blocks or added explanatory text before/after the JSON, causing parsing failures.
Solution:Β I added defensive parsing logic that:
  • Strips markdown wrappers (Β json ...Β Β )
  • Handles both clean JSON and wrapped JSON
  • Falls back gracefully if parsing fails
  • Returns user-friendly error messages

Challenge 3: Scheduling Reminders Across Time Zones

Problem:Β Users are in different time zones, but reminders need to be sent at specific local times (8:00 AM and 9:00 PM IST).
Solution:Β EventBridge cron expressions are in UTC. I calculated the UTC equivalent of 8:00 AM and 9:00 PM IST:
  • Morning:Β Β cron(30 2 * * ? *)Β Β (8:00 AM IST = 2:30 AM UTC)
  • Night:Β Β cron(30 15 * * ? *)Β Β (9:00 PM IST = 3:30 PM UTC)

Challenge 4: Processing Time and User Experience

Problem:Β The full pipeline (upload β†’ Bedrock analysis β†’ DynamoDB storage) takes 10-15 seconds. Without feedback, users think the app is broken.
Solution:Β I added progressive status messages in the UI:
  • "πŸ“· Uploading prescription..."
  • "πŸ€– AI is analyzing..."
  • "βœ… Medicine added successfully!"
Users now know exactly what's happening at each step.

Challenge 5: IAM Permissions Complexity

Problem:Β Lambda functions need permissions for Bedrock, DynamoDB, and SES. Getting permissions wrong causes cryptic "AccessDenied" errors.
Solution:Β I created separate IAM roles for each Lambda function with least-privilege permissions:
  • MedMinder_API role:Β DynamoDB + Bedrock access
  • MedMinder_Reminder role:Β DynamoDB + SES access
This ensures each function only has the permissions it needs.

Challenge 6: S3 Public Access and CORS

Problem:Β The S3-hosted frontend couldn't communicate with Lambda due to CORS restrictions and bucket policy conflicts.
Solution:
  • Disabled "Block Public Access" on the S3 bucket
  • Added a bucket policy allowing public read access to index.html
  • Enabled CORS on Lambda Function URLs with proper headers
  • Configured allowed origins, methods, and headers

ο»Ώ

AWS Services Used / Architecture Overview

Architecture Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ USER BROWSER β”‚
β”‚ (S3 Static Website) β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ MedMinder Frontend (index.html) β”‚ β”‚
β”‚ β”‚ - Email input & save β”‚ β”‚
β”‚ β”‚ - Prescription upload (AI extraction) β”‚ β”‚
β”‚ β”‚ - Manual medicine entry β”‚ β”‚
β”‚ β”‚ - Today's schedule view β”‚ β”‚
β”‚ β”‚ - Mark as taken functionality β”‚ β”‚
β”‚ β”‚ - Local storage for offline access β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β”‚ HTTPS
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AWS LAMBDA (API) β”‚
β”‚ MedMinder_API Function β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Endpoints: β”‚ β”‚
β”‚ β”‚ - POST /extract β†’ Analyze prescription image β”‚ β”‚
β”‚ β”‚ - POST /add β†’ Store medicine in DynamoDB β”‚ β”‚
β”‚ β”‚ - POST /register β†’ Register user email β”‚ β”‚
β”‚ β”‚ - GET /medicines β†’ Retrieve user medicines β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚ β”‚ β”‚
β”‚ β”‚ β”‚
β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”
β”‚ Bedrock β”‚ β”‚DynamoDB β”‚ β”‚ SES β”‚
β”‚(Nova β”‚ β”‚(Storage)β”‚ β”‚ (Email) β”‚
β”‚ Lite) β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ β”‚ β”‚ β”‚ β”‚ β”‚
β”‚ AI Image β”‚ β”‚Tables: β”‚ β”‚ Sends β”‚
β”‚ Analysis β”‚ β”‚- Meds β”‚ β”‚ Emails β”‚
β”‚ β”‚ β”‚- Users β”‚ β”‚ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
ο»Ώ
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AWS EVENTBRIDGE β”‚
β”‚ (Scheduled Reminders) β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ Cron Rules: β”‚ β”‚
β”‚ β”‚ - Morning: cron(30 2 * * ? *) β†’ 8:00 AM IST β”‚ β”‚
β”‚ β”‚ - Night: cron(30 15 * * ? *) β†’ 9:00 PM IST β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ AWS LAMBDA (Reminder) β”‚
β”‚ MedMinder_Reminder Function β”‚
β”‚ β”‚
β”‚ β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚ β”‚ 1. Check current time (morning/afternoon/night) β”‚ β”‚
β”‚ β”‚ 2. Query DynamoDB for all users β”‚ β”‚
β”‚ β”‚ 3. Find medicines due at current time β”‚ β”‚
β”‚ β”‚ 4. Format HTML email with medicine details β”‚ β”‚
β”‚ β”‚ 5. Send via SES β”‚ β”‚
β”‚ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ User Email β”‚
β”‚ (Reminder) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
ο»Ώ

AWS Services

AWS Service
Role
Free Tier
Amazon S3
Two buckets β€” medicine image storage + static website hosting for frontend
5GB free
AWS Lambda (Python 3.12)
Two serverless functions handling API requests and scheduled reminders
1M requests/month free
Amazon Bedrock (Nova Lite)
AI engine β€” analyzes prescription images and extracts medicine details
~$0.0002/request
Amazon DynamoDB
NoSQL database storing all medicine records and user emails with on-demand capacity
25GB free
Amazon SES
Email delivery service β€” sends reminder emails at scheduled times
200 emails/day free
Amazon EventBridge
Serverless event bus β€” triggers reminder Lambda at scheduled times (8 AM & 9 PM IST)
100 rules free
AWS IAM
Identity and access management β€” least-privilege permissions for each Lambda function
Free

ο»Ώ

How the Agent is Triggered

User Flow: Adding a Medicine

  1. User opens the MedMinder web app (hosted on S3)
  1. User enters their email address and clicks "Save Email"
  1. Frontend registers email with Lambda API
  1. User uploads a prescription image (photo or screenshot)
  1. Frontend converts image to Base64 and sends to LambdaΒ Β /extractΒ Β endpoint
  1. Lambda calls Amazon Bedrock Nova Lite with the image
  1. Bedrock analyzes the image and returns structured medicine data (name, dosage, frequency, duration, notes)
  1. Lambda stores the medicine in DynamoDB
  1. Frontend displays the extracted medicine in the dashboard
  1. User confirms and medicine is added to their list

Reminder Flow: Automated Email Reminders

  1. EventBridge triggers at 8:00 AM ISTΒ (cron rule:Β Β cron(30 2 * * ? *)Β )
  1. Lambda MedMinder_Reminder function is invoked
  1. Lambda queries DynamoDB for all registered users
  1. For each user, Lambda finds medicines due at morning time
  1. Lambda formats a beautiful HTML email with:
  • Medicine names and dosages
  • Special instructions (e.g., "Take after food")
  • Encouragement message
  1. Lambda sends email via Amazon SES
  1. User receives reminder email
  1. EventBridge triggers again at 9:00 PM ISTΒ (cron rule:Β Β cron(30 15 * * ? *)Β )
  1. Same process repeats for night medicines

Dashboard Features

  • Today's ScheduleΒ β€” View medicines due today organized by time
  • Mark as TakenΒ β€” One-click to track which medicines you've taken
  • All MedicinesΒ β€” View complete list of all medicines with details
  • Local StorageΒ β€” Data persists even after browser refresh
  • Cloud SyncΒ β€” All data synced to DynamoDB for persistence

ο»Ώ

Deployment

The entire infrastructure is deployed manually through the AWS Console:

Step 1: Create DynamoDB Tables

1. Go to AWS Console β†’ DynamoDB
2. Create MedMinder_Medicines table
- Partition key: user_email (String)
- Sort key: medicine_id (String)
- Billing: On-demand
3. Create MedMinder_Users table
- Partition key: email (String)
- Billing: On-demand
ο»Ώ

Step 2: Deploy Lambda Functions

1. Go to AWS Console β†’ Lambda
2. Create MedMinder_API function
- Runtime: Python 3.12
- Copy code from backend/lambda_api.py
- Add permissions: AmazonDynamoDBFullAccess, AmazonBedrockFullAccess
- Create Function URL (CORS enabled)
3. Create MedMinder_Reminder function
- Runtime: Python 3.12
- Copy code from backend/lambda_reminder.py
- Add permissions: AmazonDynamoDBFullAccess, AmazonSESFullAccess
- Add EventBridge triggers (morning & night cron rules)
ο»Ώ

Step 3: Set Up Amazon SES

1. Go to AWS Console β†’ SES
2. Create verified identity with your email
3. Verify email from inbox
4. Update Lambda with verified email address
ο»Ώ

Step 4: Create S3 Buckets

1. Create bucket: medminder-app-naveen
2. Disable "Block Public Access"
3. Enable static website hosting
4. Add bucket policy for public read access
5. Upload index.html (with Lambda URL updated)
ο»Ώ

Step 5: Configure EventBridge

1. Go to AWS Console β†’ EventBridge
2. Create rule: MedMinder_MorningReminder
- Schedule: cron(30 2 * * ? *)
- Target: MedMinder_Reminder Lambda
3. Create rule: MedMinder_NightReminder
- Schedule: cron(30 15 * * ? *)
- Target: MedMinder_Reminder Lambda
ο»Ώ
Total deployment time: 45-60 minutes
Total monthly cost: $0Β (All within AWS Free Tier)

ο»Ώ

What I Learned

1. Bedrock Nova Lite is Remarkably Effective for Multimodal Analysis

The model accurately extracts medicine details from prescription images with minimal errors, even with poor image quality, angles, or partial visibility. It handles handwritten notes, printed receipts, and digital screenshots equally well.

2. Lambda Function URLs Simplify Architecture

Instead of API Gateway, Function URLs provide direct HTTPS endpoints, reducing complexity for simple use cases. No need for API Gateway configuration, CORS setup, or resource management.

3. IAM Permissions are Critical to AWS Security

Understanding least-privilege access is essential. Each Lambda function should only have the permissions it needs. This prevents security breaches and makes debugging easier.

4. EventBridge Provides Powerful Scheduling Without Infrastructure

Cron-based scheduling eliminates the need for managing cron jobs, polling loops, or scheduled tasks. The system only runs (and costs money) when there's actual work to do.

5. Amazon SES Sandbox Mode is Perfect for Testing

Free email sending for verified addresses makes testing reminders easy before production. The sandbox mode is ideal for personal tools and low-volume applications.

6. DynamoDB On-Demand Pricing is Ideal for Variable Workloads

No need to provision capacity; pay only for what you use. This makes DynamoDB perfect for personal tools that are used daily but not continuously.

7. AWS Free Tier Supports Real, Production-Ready Applications

A fully functional, production-ready health app costs $0 per month, making AWS accessible to everyone. This democratizes application development.

8. Starting Simple Wins

I initially planned to add user authentication (Cognito), monthly reports with charts, medicine interaction checking, and refill reminders. By focusing on the core workflow (upload prescription β†’ get categorized medicine β†’ receive reminders), I shipped a working tool in one weekend that solves my actual problem today.

9. Serverless is Perfect for Personal Tools

I use this app daily but not continuously. Pay-per-use means my monthly cost is under $0.05, compared to running an EC2 instance 24/7 for a tool I use for 5 minutes a day.

10. Health Tech Can Be Built Quickly and Affordably

MedMinder proves that you don't need a massive budget or complex infrastructure to build impactful health applications. By leveraging AWS serverless services, I built a production-ready app in one weekend that could genuinely improve people's health outcomes.

ο»Ώ

Link to App & Repo

πŸ’»Β GitHub Repository:Β Β https://github.com/naveend31/MEDMINDERΒ 
πŸ“–Β Documentation:Β Complete setup guides, API documentation, and troubleshooting included in repository

ο»Ώ
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