Enabling enterprise Telemetry on AWS: Handling massive data backfills using ECS and Databricks wi...
17 June 2026 - 1 min. read
Keidi Xhafa

Everyone wants to show off with Generative AI, but then they clash with reality: every company sits on a mountain of PDFs, crooked scans, and utility bills that hide precious data. Extracting them at an Enterprise scale raises two major problems: how to do it accurately and, above all, how to do it without the CFO passing out when the AWS bill arrives at the end of the month?
Together with NeN, an innovative, 100% green and digital Italian energy provider, we tackled this exact challenge. Here is how we transitioned from a "Pure LLM" PoC (beautiful, but expensive) to an intelligent, hybrid, and self-learning architecture
When you need to extract data from a document, the market presents you with four options:

In our early stage, we bet everything on setup speed and maximum versatility. Therefore, we chose the "all LLM" route. We built a ground truth of 20 utility bills (electricity, gas, dual, native PDFs, and scans) and put several models in the ring.
Choosing a model based on a "gut feeling" is not an acceptable option in engineering. It is the rigorous, data-driven method that transforms a gamble into a solid architectural decision. Here is the process we followed:
The absolute winner for the price/performance ratio? Claude 4.5 Sonnet, orchestrated naturally through Amazon Bedrock.
The PoC was set up in no time: decoupling with Amazon API Gateway, storage on Amazon S3, AWS Lambda acting as the glue, and Bedrock working the magic. The system extracted data with frightening accuracy. But there was a problem: using a high-end LLM for every single bill, especially on production volumes, is not financially sustainable. It is like using a Ferrari to go grocery shopping around the corner.
We had to optimize. And to do so, we looked our data in the face. Bills have two key characteristics:
Why pay the LLM to struggle to understand a structure that we have actually already seen?
We needed a way to instantly understand if a document belonged to a known template. Pure computer vision models are fast but fragile, while multimodal models are too heavy. The solution? The Embedding algorithm. We transform the bill template into a numerical vector (an objective digital fingerprint). To understand if a new bill matches a known layout, we just need to calculate the cosine similarity between vectors. Fast, painless, and cheap.
We thus designed a two-speed Version 2.0 architecture:
From here, the flow splits:
The result? A self-learning ecosystem. Costs plummet as the system stores new templates, and the LLM works only when gray matter is truly needed.
Delegating everything to an algorithm in production is the fastest way to lose sleep at night. For this reason, we inserted a Human-in-the-Loop (HITL) pattern as the linchpin of governance:
Generative AI is not the solution to everything, it is a tool. Architectural maturity in the Cloud is not demonstrated by firing Foundation Models at every single task hoping it works. True Engineering (with a capital E) lies in orchestration: use Large Language Models only for pure cognitive capability, rely on classical OCR to push efficiency on deterministic tasks, and use Embeddings for intelligent routing.
This way you will have an architecture that not only scales amazingly, but learns on its own, leaves you in full control of your data, and makes your FinOps smile.
Proud2beCloud is a blog by beSharp, an Italian APN Premier Consulting Partner expert in designing, implementing, and managing complex Cloud infrastructures and advanced services on AWS. Before being writers, we are Cloud Experts working daily with AWS services since 2007. We are hungry readers, innovative builders, and gem-seekers. On Proud2beCloud, we regularly share our best AWS pro tips, configuration insights, in-depth news, tips&tricks, how-tos, and many other resources. Take part in the discussion!