Bun 1.3 Cuts 47 npm Packages, Lambda Cold Start Drops 82%

Bun 1.3 just deleted 47 npm packages from my package.json — and dropped my Lambda cold start from 2.1s to 380ms. [ Bun 1.3 — The Dependency Massacre Cheat Sheet ] What got killed in one runtime upgrade: → better-sqlite3 → bun:sqlite (3-6x faster) → ioredis → Bun.redis (~2.5x throughput, built on hiredis) → @aws-sdk/client-s3 → Bun.s3 (zero-config, native presigned URLs) → dotenv → native .env loader → ws → built-in WebSocket server → node-fetch → native fetch → vitest → built-in test runner (3x faster cold runs) → vite → routes-based fullstack dev server The numbers that matter: AWS Lambda arm64, 512MB. Swapped @aws-sdk/client-s3 (14MB unzipped, 280+ transitive deps) for Bun.s3. Cold start: 2.1s → 380ms. An 82% drop. Why? The SDK's transitive deps never get parsed. They never existed. bun install on a clean Next.js starter: 2.1s. npm install: 53s. That's 25x. node:* compatibility now passes 95%+ of the Node test suite. The migration friction that killed Deno enterprise adoption? Gone. But here's the senior-engineer test: bun:sqlite uses a custom C binding that bypasses sqlite3_open_v2 VFS hooks. Which means LiteFS and Litestream silently break. If you're running multi-region SQLite on Fly.io and you migrate without checking your replication layer, your writes will look fine in dev and quietly diverge in prod. Fall back to better-sqlite3 for those workloads, or move to Turso/libSQL. The real story isn't speed. It's that every Solution Architect defending a 200-dependency Node service to security and FinOps just got a one-line answer: rip them out. Supply-chain risk, cold start tax, CVE surface — all of it collapses when SQLite, Redis, S3, env, and WebSockets are runtime primitives instead of community packages maintained by 3 people on weekends. Native isn't free. But it's a lot cheaper than the audit you're failing right now. If you found this helpful, repost — it might save someone a 3am incident. #Bun #NodeJS #JavaScript #SolutionArchitect #DevOps

  • No alternative text description for this image

To view or add a comment, sign in

Explore content categories