← All work
2024 · Experimentation Developer

Building a Product Data Feed with the BigCommerce API and AWS

A scheduled Lambda that pulls product data out of BigCommerce and feeds it to permanent on-site UIs for badges, attributes, and pricing.

  • JavaScript
  • AWS Lambda
  • BigCommerce API
  • JSON

Problem

A client on BigCommerce wanted product badges, attribute indicators, and dynamic pricing in a permanent on-site UI. That data lived in BigCommerce but not in the page's data layer, and you can't call the API from the browser — so the front end had nothing to render from. Hard-coding was a non-starter: prices move, products come and go, and nobody wants to deploy just to change a price.

Approach

I wrote an AWS Lambda that calls the BigCommerce API every 15 minutes and saves the result as a JSON file shaped for exactly what the UI needs. The UIs serve to all traffic and, on load, read that file to render the badges, indicators, and pricing — so new products and price changes show up with no one touching the experience.

Notes

  • The hard part wasn't the Lambda — it was shaping the JSON so the browser had almost nothing to do.
  • A 15-minute refresh balanced staying current against hammering the API.
  • Permanent UIs, not throwaway tests, meant being far more careful about edge cases.

Results

Both UIs are still live in the store's normal shopping flow — one feature that became something merchandising relies on. The trick was the payload: shape it right and the browser has nothing left to do.

Outcome — Two always-on UIs that are now part of the live storefront