Price an AWS Lambda function from memory, duration and invocations in GB-seconds, including the free tier and Arm savings.
Lambda charges two separate meters: a flat fee per request and a compute fee for the memory you reserved multiplied by the milliseconds you ran. Because memory is reserved rather than measured, a function set to 1024 MB pays for 1 GB even if it touches 90 MB of heap. The defaults here are US East list prices — confirm the current per-GB-second and per-request rate on the AWS Lambda pricing page for your region before you commit to a budget. Compute normally dominates a Lambda bill, so the single most valuable thing you can know is your monthly GB-second total: it tells you whether to tune memory, tune duration, or stop worrying about the invocation count.
Lambda Cost
GB-seconds = (memory MB ÷ 1024) × (duration ms ÷ 1000) × invocations; cost = billable GB-seconds × GB-second price × architecture factor + billable requests ÷ 1 M × request price.
Free-tier deduction
billable GB-seconds = max(0, GB-seconds − 400,000); billable requests = max(0, invocations − 1,000,000).
GB-seconds = (memory MB ÷ 1024) × (duration ms ÷ 1000) × invocations; cost = billable GB-seconds × GB-second price × architecture factor + billable requests ÷ 1 M × request price. Lambda charges two separate meters: a flat fee per request and a compute fee for the memory you reserved multiplied by the milliseconds you ran. Because memory is reserved rather than measured, a function set to 1024 MB pays for 1 GB even if it touches 90 MB of heap. The defaults here are US East list prices — confirm the current per-GB-second and per-request rate on the AWS Lambda pricing page for your region before you commit to a budget.
Compute normally dominates a Lambda bill, so the single most valuable thing you can know is your monthly GB-second total: it tells you whether to tune memory, tune duration, or stop worrying about the invocation count.
This calculator takes 9 inputs: Invocations per month, Memory configured, Average billed duration, Processor architecture, Ephemeral /tmp storage, Price per GB-second, Price per million requests, Price per GB-second of /tmp, Apply the perpetual free tier. The pre-filled defaults are a realistic starting point — replace them with figures from your own environment for a result you can act on.
The usual extras are data transfer out, the API Gateway or ALB in front of the function, CloudWatch Logs ingestion for whatever the function prints, and provisioned concurrency sitting idle. Lambda compute is often less than half the true cost of a serverless request path.
The 400,000 GB-second and 1 M request free tier applies to on-demand invocations. Provisioned concurrency is billed on its own meter for every second the capacity is configured, whether or not a request arrives, and is not covered by the free tier.