
I Broke My AWS Account Before I Broke Any Code
A hackathon post mortem on hitting an undocumented Bedrock restriction on a brand new AWS account and why the workaround ended up better than the original plan.
I had exactly one weekend, one AWS account created that morning and a plan that made sense on paper : photograph a medicine strip, let Amazon Bedrock read the label, flag anything expired or unsafe, done. I'd built the whole architecture in my head before I'd even finished my coffee.
Bedrock said no. Not politely either — just Â
ValidationException: Operation not allowed , over and over no matter which model I tried.The problem I was actually solving
Before I get to the AWS drama. MedBridge exists because of a genuinely dumb everyday waste. Households throw away unused, unexpired medicine constantly while people two streets over skip doses they can't afford. Hospital drug banks already fix this (SMS Hospital Jaipur runs one) but it's all manual. Someone squints at an expiry date, someone else cross checks it against a paper list of who needs what. It works but it doesn't scale past one building.
So I built the digital version. A donor photographs a medicine, it goes into a "pending review" queue and a verified custodian ( an NGO or hospital; never a stranger ) approves it before it's matched to anyone. That part of the design didn't change all weekend. What changed was everything under the hood.
Where it actually broke
Turns out new AWS accounts get a quiet verification hold on Bedrock (and Textract and Rekognition) that isn't mentioned anywhere during signup. I found this out the hard way, mid hackathon, with a deadline that did not care about my account's verification status. I filed a support case. I refreshed the model catalog page more times than I'd like to admit. Nothing.
At some point you have to stop waiting for AWS to fix your problem and just fix your own problem instead.
The pivot
I moved OCR into the browser. Tesseract.js ( free, open source, zero AWS dependency ) reads the medicine label directly on the user's device. Only the extracted text, not the photo, ever reaches my Lambda function. The safety check stopped being an AI call and became honest readable Python : if the age is under 12 and the drug is on a short watch list, flag it for a pharmacist. Nothing clever but nothing hidden either.
Here's the part I didn't expect : this is a better architecture; not a consolation prize. The photo never touches a server so there's less to worry about privacy wise. It deploys instantly on any AWS account including one created five minutes ago. And when I explain it in my demo video there's no black box; I can point at the exact three lines of logic that decided something needed a pharmacist's eyes.
What actually impressed me
Once I stopped fighting Bedrock the rest of the stack was genuinely smooth. AWS SAM turned my whole backend ( four Lambda functions, two DynamoDB tables, an S3 bucket, an API Gateway ) into one Â
template.yaml file and two terminal commands.  sam build ,  sam deploy , done. As someone who'd never deployed serverless infrastructure solo before, I expected to spend a day untangling IAM permissions. Instead I defined each function's permissions right next to the function itself and moved on with my life.DynamoDB's on demand billing meant I never had to guess at capacity while sleep deprived and behind schedule, which given the circumstances, was one less decision I had to make correctly.
The one thing I'd actually change
Tell people about the verification hold before they hit it. A single line during account signup, "AI services may take up to X hours to activate on new accounts", would have saved me a support ticket and a genuinely stressful afternoon. I don't think this is a small thing for hackathons specifically a 4 day clock and an unannounced multi hour wait are fundamentally incompatible.
MedBridge works end to end now — upload, OCR, custodian approval, matching, safety flag, confirmed handoff, all live on AWS. It just runs on a different foundation than the one I started with on Thursday morning and I think it's stronger for it.
Enjoyed reading this content? Let the author know!
Your likes, comments, shares, and saves help creators reach more builders.
Loading recommendations
Loading article