A packaging data reporter on AWS for a few dollars a month
A wholesaler with 3,140 lines filed its packaging data the way most businesses do: one person, one spreadsheet, six weeks, and a set of assumptions nobody wrote down. The following year somebody asked why bulk catering packs were being reported as household packaging. Nobody could answer, because the previous year’s working no longer existed.

Key takeaways
- The obligation attaches to an activity, not to whoever printed the box.
- Weights come from suppliers, scales or samples, and the method is part of the answer.
- Fees attach to the household portion, so the split is worth more than the total.
- Seven years of working has to survive, not just the numbers filed.
- Designed on AWS for about $3 a month.
The whole system on one page
Before any code, here is the shape of what we are designing.
- Machine learning
- Security & identity
- Analytics
Why this is hard for a business that is otherwise well run
Because the data it needs has never been anybody’s job. A wholesaler knows precisely how many units of each line it shipped, to whom, at what price, in what month. It has no idea what the outer case weighs empty, because there has never been a reason to know and the supplier who makes the case has never been asked.
So the first submission is done by a person with a set of kitchen scales and a spreadsheet, working through the biggest lines and estimating the rest, and it takes six weeks. The second one is done the same way by somebody else, because the first person left and the working was in a tab called final v4 that nobody can now interpret.
What runs (the inside)
- Obligation. Which packaging is legally yours to report, decided per item against a defined set of activities. Part 2.
- Weights. A per-unit weight for every component of every line, and the method that produced it. Part 3.
- The split. Household or non-household, decided on who actually bought it rather than on what it looks like. Part 4.
- The submission. The file that goes off, and the seven years of working that has to survive behind it. Part 5.
One wholesaler, one reporting year
In plain words
Product lines arrive from wherever the range is managed, and each one is broken into packaging components: the primary pack the product sits in, the outer case, the pallet wrap, the label, the tray. Each component has a material and a weight, and getting those two fields for a few thousand lines is the bulk of the work in this whole domain.
Before any of that matters, the system asks whether the item is yours to report at all. That is a question about activities rather than about ownership of the physical cardboard, and part two is entirely about it, because both wrong answers are expensive: reporting somebody else’s packaging costs fees you do not owe, and not reporting your own is a compliance failure.
Sales volumes come in monthly and multiply up. Units shipped times per-unit weight, summed by material, gives tonnage placed on the market, which is the headline number and the easy part. It is the easy part precisely because all the difficulty was moved upstream into establishing the per-unit weight once.
Then each tonne is assigned to household or non-household, which decides whether it carries a disposal fee. This is decided on evidence about who bought it, held per line, because the same case of the same product is household packaging when a supermarket sells it and non-household when a catering wholesaler does.
Design rules that shaped every decision
- Every weight carries the method that produced it, and its date.
- An estimate is a first-class value, not a missing value with a guess in it.
- The obligation is decided per item and records which activity triggered it.
- The household split is evidence, not a property of the product.
- A submitted figure is frozen. Later corrections are new versions, never edits.
- Everything is retained for seven years, including the working, not just the totals.
What it does not do
It does not file the return. The submission route has its own portal and its own format and both change; this system produces the dataset that goes into it and the record of how every line was derived. That division has held up well in the other compliance systems in this series and it holds up here.
It does not tell you whether you are obligated in the first place either. That is a question about your turnover, your group structure and your tonnage, and the answer changes the whole shape of what you have to do. The system computes both test figures and shows you where you sit; a person decides what that means.
And it does not chase your suppliers, though it produces the list of who to chase and what each missing specification is worth in tonnage. That list turns out to be the most useful thing it makes in the first year, because the difference between a supplier-provided weight and a sampled one is the difference between a line an auditor skips and a line an auditor asks about.
The next four posts walk through each piece: whose packaging it is, how to weigh what you cannot weigh, how the household split is decided, and what the submission and the audit behind it have to contain. One diagram per post, a cost breakdown, and an engineering reference at the end.
All posts