{"slug": "smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock", "title": "Smart Grocery Sorter: Building a Serverless AI App with Amazon Bedrock", "summary": "A developer built Smart Grocery Sorter, a serverless web application that uses Amazon Bedrock's Nova Lite model to automatically categorize free-form grocery lists. The app sends items from a Netlify-hosted JavaScript frontend through API Gateway to a Python AWS Lambda function, which prompts Bedrock and returns categorized results as JSON within seconds. The developer framed the project as a practical experiment in applying generative AI instead of rule-based categorization.", "body_md": "Have you ever created a grocery shopping list only to spend extra time organizing it into categories before heading to the supermarket?\n\nI built **Smart Grocery Sorter**, a lightweight AI-powered web application that automatically organizes grocery items into meaningful categories using Amazon Bedrock and AWS serverless services.\n\nSimply enter your grocery items, click **Sort List**, and let AI organize everything for you.\n\n🔗 **Live Demo:** [https://gs-ai-jyog.netlify.app/](https://gs-ai-jyog.netlify.app/)\n\n💻 **GitHub Repository:** [https://github.com/GunnerJyo/grocery-sorter-ai](https://github.com/GunnerJyo/grocery-sorter-ai)\n\nA typical grocery list might contain fruits, vegetables, dairy products, grains, meat, and household supplies, all mixed together.\n\nManually organizing these items takes time, especially when the same task needs to be repeated every week.\n\nI wanted to solve this problem by building an application that could:\n\nThe result was Smart Grocery Sorter: a simple application that turns an unorganized list into a structured shopping list within seconds.\n\nI chose a serverless architecture to keep the application lightweight and minimize infrastructure management.\n\n```\n       User\n        |\n        v\n  HTML / CSS / JavaScript\n      (Netlify)\n        |\n        | HTTP POST\n        v\n  Amazon API Gateway\n        |\n        | Invoke\n        v\n    AWS Lambda\n      (Python)\n        |\n        | Prompt\n        v\n   Amazon Bedrock\n   (Amazon Nova Lite)\n        |\n        | Categorized Items\n        v\n    AWS Lambda\n        |\n        | JSON Response\n        v\n  Amazon API Gateway\n        |\n        v\n      Frontend\n```\n\nThe frontend is hosted on Netlify, while the backend logic and AI processing run on AWS.\n\n| Service / Technology | Purpose | \n|---|---|\n| Amazon Bedrock | AI-powered grocery categorization | \n| Amazon Nova Lite | Foundation model for processing the list | \n| AWS Lambda | Serverless Python backend | \n| Amazon API Gateway | HTTPS API endpoint | \n| Netlify | Frontend hosting | \n| IAM | Access control and permissions | \n| HTML, CSS, JavaScript | User interface | \n| Python | Backend application logic | \n\nThe application follows a straightforward request-response workflow.\n\n**1. Enter grocery items**\n\nThe user enters one item per line in the web interface.\n\nFor example:\n\n```\nApples\nMilk\nBread\nTomatoes\nChicken\nRice\nDishwashing liquid\nCheese\n```\n\n**2. Send the request**\n\nWhen the user clicks **Sort List**, JavaScript collects the input and sends a JSON payload to Amazon API Gateway using the Fetch API.\n\n**3. Process the request with Lambda**\n\nAPI Gateway invokes the Python Lambda function. The function extracts the grocery items and constructs a prompt for Amazon Bedrock.\n\n**4. Categorize items using AI**\n\nAmazon Nova Lite processes the list and organizes the items into relevant grocery categories.\n\n**5. Return the results**\n\nLambda formats the model's response as JSON and returns it through API Gateway.\n\n**6. Display the organized list**\n\nThe frontend receives the response and displays the categorized grocery items in the browser.\n\nThe entire process happens within seconds, without requiring the user to manually organize the list.\n\nOne of the main goals was to experiment with generative AI in a practical application rather than building a traditional rule-based categorization system.\n\nAmazon Bedrock provides access to foundation models through a managed service. In this project, I used **Amazon Nova Lite** to interpret grocery items and determine appropriate categories.\n\nThis approach helps handle different kinds of items without maintaining a large collection of manually defined categorization rules.\n\nFor example, the model can organize items into categories such as:\n\nThe exact categories depend on the items provided and the model's response.\n\nBuilding the application involved a few practical debugging and integration challenges.\n\nInitially, my Lambda function expected requests in the format generated by API Gateway.\n\nHowever, when I tested the function directly through the Lambda console, the", "url": "https://wpnews.pro/news/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock", "canonical_source": "https://dev.to/gunnerjyo/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock-3f9j", "published_at": "2026-10-22 12:30:00+00:00", "updated_at": "2026-10-22 12:43:05.238875+00:00", "lang": "en", "topics": ["generative-ai", "ai-products", "ai-tools", "artificial-intelligence", "large-language-models"], "entities": ["Amazon Bedrock", "Amazon Nova Lite", "AWS Lambda", "Amazon API Gateway", "Netlify", "AWS", "Python"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock", "markdown": "https://wpnews.pro/news/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock.md", "text": "https://wpnews.pro/news/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock.txt", "jsonld": "https://wpnews.pro/news/smart-grocery-sorter-building-a-serverless-ai-app-with-amazon-bedrock.jsonld"}}