AWS Lambda cold starts with a Node.js function — how to reduce them?

asked 2 months ago473 viewsen

2

My Lambda has noticeable cold starts (~800ms). Bundle size is 4MB. What are the highest-impact fixes (provisioned concurrency, bundling, runtime choice)?

AI diagnosis

AI-generated. Not an answer — the community below confirms or corrects it. Always verify before relying on it.

asked 2 months ago
  • Thanks, this helped. Did you also try clearing the cache?

    — marielouis 2 months ago

1 Answer

6

Biggest wins in order: (1) bundle with esbuild and tree-shake to shrink the artifact, (2) move heavy init out of the handler, (3) provisioned concurrency for latency-critical paths. Runtime choice matters less than bundle size.

Sign in to tell others whether this worked.

answered 2 months ago

Sign in and verify your email to post an answer.