AWS Lambda Memory Size Calculator

Lambda has no separate memory request and limit — one MemorySize value sets your function's memory, its proportional vCPU allocation, and its per-millisecond cost all at once. Running out causes a hard failure rather than graceful throttling, so this calculator sizes memory from peak usage, not average, and flags anything outside AWS's 128–10240 MB range.

01 Usage data

Enter observed usage directly, in MiB.

02 Workload profile

Advanced: margins and defaults

Values the result relies on that are our own defaults, or vendor defaults your setup may change. Each “?” says how one moves the result; the guide says where it comes from.

03 Sizing gauge

0 —

04 Lambda function configuration

—

05 How this was derived

Enter usage data to see the calculation.

MemorySize in short

MemorySize is the memory available to the function at runtime, from 128 MB to 10,240 MB in 1 MB steps. Lambda allocates CPU in proportion to it: at 1,769 MB a function has the equivalent of one vCPU. AWS docs

There is no separate reservation and limit, and running out of memory fails the invocation, so the calculator sizes MemorySize from the peak alone; the average you enter doesn't change the result. The margin is MemoryLimit's own default, not a vendor figure; you can change it under Advanced.

It only answers the memory question: how much the function needs so it doesn't run out. It doesn't measure duration, so it can't tell whether more memory would make a function faster or cheaper. AWS suggests the open-source Lambda Power Tuning tool for that. AWS docs

Common input mistakes

  • Pasting figures other than each invocation's maximum (@maxMemoryUsed): averages hide the peak and give a result that is too small.
  • A window that misses the busiest invocations: MemorySize comes out too low.
  • Reading the result as the fastest or cheapest size: it is sized for memory use only.

Full derivation, warnings and every assumption: how the AWS Lambda calculator works. The shared formula and margin tables: the sizing model.

Related calculators: