AWS Builder Center
Title: Building LabelLens: what a real AWS deploy taught us that the docs didn't

Title: Building LabelLens: what a real AWS deploy taught us that the docs didn't

In India, you can't tell from a food label alone whether a packaged snack is actually high in sugar, salt, or fat FSSAI's own proposed warning labels only trigger when two of the three are high together.

We built LabelLens for First Commit (WeMakeDevs × AWS) to solve a real, current problem: India's Supreme Court ordered FSSAI to act on front-of-pack food warnings in Feb 2026, but FSSAI's own proposal only flags a product when it's high in two or more of sugar/fat/salt something dangerously high in sugar alone gets no warning under phase one. LabelLens closes that gap today: photograph the back of any packet, and it flags any single high nutrient against WHO daily-limit guidance, checks the FSSAI license number's structure, and flags additive/allergen ingredients all deterministically in code, never left to the model's judgment.
The architecture is deliberately small: a static frontend on AWS Amplify Hosting, two AWS Lambda functions behind Amazon API Gateway, Amazon Bedrock for the one multimodal extraction call, Amazon DynamoDB for the nutrition journal. What made it interesting to build wasn't the happy path it was four real gotchas we hit shipping it:
1. Bedrock's Structured Outputs schema field wants a JSON string, not an object and every object type needs additionalProperties: false explicitly, or you get a SerializationException that doesn't tell you why. 2. Anthropic models on Bedrock need a separate "model use case" form, distinct from model access. We switched to amazon.nova-pro-v1:0 and it worked immediately, through the exact tool_use fallback path we'd already built for exactly this situation. 3. Lambda Function URLs, configured exactly per AWS's own docs, returned 403 on our account an account-level guardrail against public Function URLs we only discovered by trial and error. API Gateway (HTTP API) was the actual working path. 4. API Gateway's create-api --target "quick create" doesn't grant itself Lambda invoke permission every request silently 500'd with zero CloudWatch logs until we added the permission manually.
The best find, though, came from testing with a real label image instead of a blank test pixel: Nova Pro misread an explicit "Sodium: 210 mg" line as "2.10 g" and wrongly applied a salt→sodium conversion meant for a different case, returning 840mg. One prompt clarification later, it read 210mg correctly. We wrote this up in the repo instead of quietly fixing it, because that's the actual shape of building with these tools the interesting bugs come from real inputs, not synthetic ones.
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