cd /news/generative-ai/smart-grocery-sorter-building-a-serv… · home › topics › generative-ai › article
[ARTICLE · art-155294] src=dev.to ↗ pub= topic=generative-ai verified=true sentiment=↑ positive

Smart Grocery Sorter: Building a Serverless AI App with Amazon Bedrock

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.

by read3 min views3 publishedOct 22, 2026

Have you ever created a grocery shopping list only to spend extra time organizing it into categories before heading to the supermarket?

I 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.

Simply enter your grocery items, click Sort List, and let AI organize everything for you.

🔗 Live Demo: https://gs-ai-jyog.netlify.app/

💻 GitHub Repository: https://github.com/GunnerJyo/grocery-sorter-ai

A typical grocery list might contain fruits, vegetables, dairy products, grains, meat, and household supplies, all mixed together.

Manually organizing these items takes time, especially when the same task needs to be repeated every week.

I wanted to solve this problem by building an application that could:

The result was Smart Grocery Sorter: a simple application that turns an unorganized list into a structured shopping list within seconds.

I chose a serverless architecture to keep the application lightweight and minimize infrastructure management.

       User
        |
        v
  HTML / CSS / JavaScript
      (Netlify)
        |
        | HTTP POST
        v
  Amazon API Gateway
        |
        | Invoke
        v
    AWS Lambda
      (Python)
        |
        | Prompt
        v
   Amazon Bedrock
   (Amazon Nova Lite)
        |
        | Categorized Items
        v
    AWS Lambda
        |
        | JSON Response
        v
  Amazon API Gateway
        |
        v
      Frontend

The frontend is hosted on Netlify, while the backend logic and AI processing run on AWS.

Service / Technology Purpose
Amazon Bedrock AI-powered grocery categorization
Amazon Nova Lite Foundation model for processing the list
AWS Lambda Serverless Python backend
Amazon API Gateway HTTPS API endpoint
Netlify Frontend hosting
IAM Access control and permissions
HTML, CSS, JavaScript User interface
Python Backend application logic

The application follows a straightforward request-response workflow.

1. Enter grocery items

The user enters one item per line in the web interface.

For example:

Apples
Milk
Bread
Tomatoes
Chicken
Rice
Dishwashing liquid
Cheese

2. Send the request

When the user clicks Sort List, JavaScript collects the input and sends a JSON payload to Amazon API Gateway using the Fetch API.

3. Process the request with Lambda

API Gateway invokes the Python Lambda function. The function extracts the grocery items and constructs a prompt for Amazon Bedrock.

4. Categorize items using AI

Amazon Nova Lite processes the list and organizes the items into relevant grocery categories.

5. Return the results

Lambda formats the model's response as JSON and returns it through API Gateway.

6. Display the organized list

The frontend receives the response and displays the categorized grocery items in the browser.

The entire process happens within seconds, without requiring the user to manually organize the list.

One of the main goals was to experiment with generative AI in a practical application rather than building a traditional rule-based categorization system.

Amazon 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.

This approach helps handle different kinds of items without maintaining a large collection of manually defined categorization rules.

For example, the model can organize items into categories such as:

The exact categories depend on the items provided and the model's response.

Building the application involved a few practical debugging and integration challenges.

Initially, my Lambda function expected requests in the format generated by API Gateway.

However, when I tested the function directly through the Lambda console, the

── more in #generative-ai 4 stories · sorted by recency
── more on @amazon bedrock 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/smart-grocery-sorter…] indexed:0 read:3min 2026-10-22 · —