Case Study
HAMS reached out with a one-line brief: "We're paying too much. Can you take a look?" Behind that sentence was a serverless API that had been running in production for years, handling real-time geolocation resolution for multiple systems across the business. The bill was growing month over month, and no one had a clear picture of which part of the architecture was responsible.
Before touching anything, Renaiss spent the first weeks pulling real production metrics, mapping cost drivers, and building a precise picture of how the API actually behaved at scale. That assessment phase was the whole job. The numbers revealed two completely different problems: one cost that scaled correctly with business growth, and one structural inefficiency that would keep compounding regardless of what else was optimized.
CloudFront was processing 1.64 billion requests per month with a 97% cache hit ratio. Replacing it with API Gateway's native caching — a seemingly simpler option — would have cost $5,800–$6,475/month before accounting for degraded performance across geographies. CloudFront stayed. The EFS dependency didn't. Every Lambda invocation was mounting a remote volume to query the geolocation database — 47 million times a month. We migrated the function to a container image that packages both the code and the full database together. Remote I/O disappeared from the hot path, execution time dropped by 3×, and the billing line stopped compounding. The daily update cycle was preserved through an automated pipeline that rebuilds and deploys the image every 24 hours.
CloudFront wasn't the problem. The assessment showed a 97% cache hit ratio and a cost structure proportional to real business growth. Touching it would have cost more.
Removing the EFS network call from the critical path eliminated the main latency driver. The function now reads from a local file packaged in the container image.
47 million monthly invocations were mounting a remote volume at runtime. Migrating to a container image with an embedded database eliminated the ETDataAccess-Bytes billing line entirely.
The update cycle was preserved without the EC2 instance. A pipeline rebuilds the container image with the updated geolocation database every day and deploys it automatically.
The update cycle was preserved without the EC2 instance. A pipeline rebuilds the container image with the updated geolocation database every day and deploys it automatically.
The engagement surfaced a gap in observability that wasn't visible in the original brief. Alerting was put in place before handoff, not after the next incident.





Infrastructure Assessment
01 / 05
Cost Driver Analysis
02 / 05
CloudFront Evaluation
03/ 05
Lambda Migration to Container Image
04 / 05
Pipeline Automation & IaC
05 / 05
We pulled real production metrics before making any recommendation. Cost attribution required understanding actual traffic patterns, cache behavior, and billing mechanics — not assumptions about what the architecture was supposed to do.
Two separate cost centers emerged with different root causes. Distinguishing between a cost that scales correctly and one that compounds structurally determined which intervention made sense and which would have been a mistake.
We modeled the cost of replacing CloudFront with API Gateway's native caching. The analysis showed a projected increase of $5,800–$6,475/month — before accounting for loss of global edge distribution. CloudFront was retained.
We migrated the Lambda function from a traditional deployment package to a container image that embeds the full geolocation database. Remote I/O was removed from the execution path; execution time dropped by 3×.
The EC2-based update script was replaced by an automated pipeline that rebuilds and deploys a new container image daily. The full stack was imported into Terraform, and alerting was implemented before handoff.