Cutting AWS Cost 50–60% — While Going Faster
How I debugged spend and got performance as a bonus
Options on the table
Architecture at a glance
Background
The platform's AWS bill was growing faster than the business behind it. Some of that was real growth, but a lot was structural waste accumulated as the system scaled — the kind that compounds quietly until someone reads the cost & usage report line by line.
The constraint that made this interesting: the product is a live, latency-sensitive streaming platform. Any cost change that slowed event ingestion, the moderator dashboard, or video delivery was off the table. So the bar wasn't just 'cheaper' — it was 'cheaper without regressions, ideally faster.'
Compute & serverless efficiency
- Graviton2 migration: Moved Lambda functions from x86_64 to Graviton2 (arm64) — up to ~34% better price-performance for the same workload, essentially a free win once the runtimes were ARM-compatible.
- Artifact slimming: Cut average Lambda deployment packages from ~15MB to ~700KB. Smaller bundles download and unpack faster, which directly shrinks cold-start time and execution duration — so the perf win and the cost win are the same change.
Database & caching overhaul
The largest single line item was data — both a bloated cache tier and a telemetry table that had no business being in a transactional database.
- ElastiCache → Valkey Serverless: Migrated from provisioned ElastiCache for Redis to Valkey Serverless — a true pay-as-you-go model that eliminates paying for idle, over-provisioned cache nodes between events while keeping the performance.
- Offloading a 5TB+ table: A telemetry log table had swelled past 5TB in DynamoDB — extremely expensive for what is really append-only log data. Replaced it with a serverless pipeline: Valkey holds the hot, live data; Kinesis Firehose streams logs to S3 for cheap long-term storage; Glue catalogs them and Athena runs pay-per-query SQL straight against S3 for reporting.
- Capacity tuning: Tuned the remaining DynamoDB tables — provisioned vs. on-demand — to match actual read/write patterns instead of paying for peak capacity around the clock.
Media & infrastructure automation
- HLS pipeline: Streamlined video conversion to HLS, trimming compute overhead and storage cost in the transcoding step.
- EC2 Auto Scaling: Precise Auto Scaling groups spin instances up for traffic spikes and back down during quiet hours, so we stop paying for idle capacity overnight.
- API Gateway tuning: Tuned throttling, caching and payload sizes to cut unnecessary execution and downstream invocation cost.
Smart backup strategy
Backups are a silent cost sink when every environment is treated like production. We split AWS Backup policies by environment:
- Production: Daily, multi-region backups for high availability and disaster recovery — where it's worth paying for.
- Test / non-critical: Dialed back to weekly, single-region — no more premium multi-region storage fees for data nobody would restore.