Product categorization migration and modernization on AWS

Categorizing at scale 1000s of products using Amazon Bedrock and AWS Batch

Opportunity / Customer Challenge

A major player in the retail sector, dealing with vast product catalogues, faced a critical, non-scalable constraint in their operations: product data categorization.

The customer’s legacy process was based on brittle, on-premises scripts and required significant manual intervention from specialized staff. While this approach maintained high data quality (often 95%+ accuracy), it was inherently slow, complex, and lacked the necessary automation.

With a crucial business goal to rapidly onboard and list hundreds of thousands of new products annually, this slow, specialized approach created an insurmountable backlog. This bottleneck severely impacted product time-to-market, hindered the company’s growth, and prevented them from generating revenue from their full product catalogue. The core requirement was clear: migrate from a slow, specialized process to a fully automated, scalable solution without compromising data quality.

Solution

We engineered a decoupled, event-driven, and highly concurrent Generative AI pipeline on AWS, entirely migrating the product data workflow from on-premises systems to a modern, elastic cloud architecture.

Architecture Highlights

The solution is centered around Amazon Bedrock and AWS Batch to manage concurrency and cost-efficiency at scale:

  1. Ingestion & Chunking: Raw product data files are migrated from on-premises storage to an Amazon S3 input bucket. An S3 event triggers an AWS Lambda function, which automatically splits large files into smaller chunks to enable parallel processing.
  2. Decoupling & Throttling: The chunked files trigger messages sent to an SQS queue. This queue decouples the high-volume ingestion from the categorization process and allows a second Lambda function to poll the queue, enforcing strict rate limits and throttling.
  3. Scalable Categorization: A second Lambda function submits jobs to AWS Batch, which runs the categorization application container.
  4. Generative AI: Inside the containers, the process is streamlined:
    • Product data is enriched via an external third party web API with results cached in Amazon DynamoDB for efficiency.
    • The container invokes Amazon Bedrock, utilizing the Claude 4 Sonnet model. The prompt is meticulously tailored to incorporate the customer’s internal product data and the external product description to achieve high categorization accuracy.
  5. Output: The fully categorized data is written to an output S3 bucket, ready for immediate use by the customer’s downstream systems.

Outcome

The project successfully migrated and transformed a manual, unscalable workload into a high-performance, fully automated Generative AI pipeline, delivering immediate, quantifiable results:

  • 150x Increase in Throughput: The critical bottleneck was eliminated. Throughput increased dramatically from a manual baseline of approximately 30 products per hour to a sustained, automated peak rate of 4,500 products per hour. This breakthrough enabled the customer to process millions of products annually.
  • High-Quality at Scale: Despite the massive increase in processing speed, the solution maintained high data standards, achieving a median categorization accuracy of 85%+.
  • Predictable and Resilient Operations: By shifting to a serverless, AWS-native solution utilizing AWS Batch and SQS, the customer gained financial predictability for scaling and ensured high resilience and stability in a multi-AZ production environment.