AWS Builder Center

Lambda reserved vs provisioned concurrency: what each setting does and costs

Study notes on two Lambda settings that sound alike but do different jobs: reserved concurrency caps and guarantees capacity, while provisioned concurrency pre-warms environments and adds cost. Includes a free-tier exercise.

Why these two settings get confused

Lambda has two settings with "concurrency" in the name. Both appear on a function's configuration page, and both count against the same account limit. They solve different problems. Mixing them up can leave you either paying for capacity you did not need or still seeing cold starts you thought you had removed.
These are study notes based on the AWS documentation and a few secondary articles. I have not run benchmarks, so any numbers below come from the sources listed at the end.

What concurrency means

Concurrency is the number of execution environments handling requests at the same moment. The Lambda documentation gives a simple formula. With 5,000 requests per second and 0.2 seconds per request, you need 1,000 environments (5,000 x 0.2).
Two quotas matter for a student account:
  • Account concurrency limit. The default is 1,000 concurrent executions per Region, shared by all functions in that Region. The AWS re:Post knowledge center adds that new accounts have reduced concurrency and memory quotas. One re:Post question describes new accounts showing a limit of 10. That is a user report, not an AWS statement, so check your own value in the Service Quotas console.
  • Requests per second. Lambda also enforces a limit of 10 times your account concurrency. At the default of 1,000, that is 10,000 requests per second.

Reserved concurrency: a cap and a guarantee

Reserved concurrency sets aside part of the account pool for one function. That has two effects:
  1. Guarantee. No other function in the account and Region can use the reserved slots.
  1. Ceiling. The function cannot exceed that number. Extra invocations are throttled.
Configuring it is free. It does not keep anything warm. The documentation notes that with reserved concurrency Lambda may completely terminate an environment after a period of inactivity, so cold starts still happen.
Reserved concurrency is useful in two situations:
  • Protecting a downstream resource. For example, a small database can only handle a few connections, so you cap the function.
  • Stopping one function from using the whole pool. A busy function can otherwise starve the others.
A secondary source says that setting reserved concurrency to zero stops all invocations, which works as an emergency off switch. I would confirm this in the console before relying on it.
One more detail from a secondary article, which I could not confirm in the AWS pages I read: Lambda keeps 100 units of the pool available for functions without reserved concurrency. If that is right, then on an account with a small quota you may not be able to reserve much, or anything. Check the console error message if a reservation is rejected.

Provisioned concurrency: pre-warmed environments

Provisioned concurrency tells Lambda to keep a set number of environments initialized and ready. It targets cold starts, which are the delay while Lambda sets up a new environment and runs your initialization code. It applies to a published version or alias, not to  $LATEST . Unlike reserved concurrency, it is billed. Several sources state that it incurs charges. I did not find a current per-hour rate in the pages I read, so check the Lambda pricing page for your Region before enabling it.
Other points from the documentation and secondary sources:
  • Provisioned concurrency can be combined with reserved concurrency, but it cannot exceed the reserved amount for that function.
  • Both types count toward your account concurrency limit.
  • Lambda still recycles provisioned environments in the background.
  • Provisioned and reserved concurrency do not replace each other. One caps and guarantees, and the other keeps environments warm.
For a learning project, provisioned concurrency is rarely the right first step. If cold starts bother you, look at your package size and initialization code first.

Scaling rate is a separate limit

Even with a high account limit, a function cannot jump to that number instantly. The Lambda quotas page says that each function can add 1,000 execution environments every 10 seconds. This is a different limit from the account total, so a sudden spike can be throttled before you reach 1,000 concurrent executions. For a student workload this is unlikely to matter, but it explains some throttling you may read about.

What it costs on the free tier

The Lambda free tier does not expire. Secondary pricing guides list 1 million requests and 400,000 GB-seconds per month, after which on-demand pricing is $0.20 per million requests plus a per-GB-second duration rate. Verify these figures on the official Lambda pricing page, because pricing changes.
Reserved concurrency adds no charge. Provisioned concurrency does, even when no requests arrive.

Exercise: throttle your own function

A good exercise is to see a throttle happen on purpose, using reserved concurrency only.
  1. Create a Python Lambda function with 128 MB memory that does  time.sleep(5)  and returns a string.
  1. Open Configuration, then Concurrency, and edit the reserved concurrency. Try a value of 1. If the console refuses because of your account quota, note the message. It tells you your real limit.
  1. Invoke the function from two CloudShell terminals within the same few seconds, using  aws lambda invoke . I would expect one call to succeed and the other to return a throttling error (TooManyRequestsException). Treat that as a prediction to test, not a result.
  1. Open the function's Monitoring tab and look at the Throttles metric.
  1. Set reserved concurrency to 0, invoke once, and see whether it is rejected.
Possible cost: a handful of 5-second invocations at 128 MB is a tiny fraction of the free tier. Do not enable provisioned concurrency in this exercise. CloudWatch Logs storage for a few log lines is negligible, but logs are billed separately from Lambda.
Cleanup: remove the reserved concurrency setting (use "Use unreserved account concurrency"), delete the function, then delete its log group in CloudWatch ( /aws/lambda/<function-name> ) and the execution role if the console created one.

Quick decision guide

  • Need to protect a database or stop one function from taking the pool: reserved concurrency.
  • Need to cut cold start latency and can pay for it: provisioned concurrency on a published version.
  • Neither of those: leave defaults and watch the Throttles metric.

Sources

Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article