Managing Concurrency, Throttling and Cold Starts
This lesson explains how Lambda scales and how to control it. Concurrency is the number of requests a function is handling at the same time, and Lambda adds execution environments to meet it, within your account's limits and any limits you set on the function.
Learning outcomes
After completing this lesson, you will be able to:
- Estimate the concurrency a workload needs from its request rate and average duration.
- Explain how account concurrency limits and scaling rates cause throttling.
- Choose between reserved concurrency, provisioned concurrency and SnapStart for a given scaling or latency requirement.
Estimating concurrency
Concurrency = requests per second × average duration in seconds.
Example. 200 requests per second at 400 ms needs about 200 × 0.4 = 80 concurrent executions. If traffic doubles and a slow dependency doubles the duration, the function needs 320. Making a function faster directly reduces the concurrency it needs.
Estimate the concurrency
Limits and throttling
Lambda limits both the total number of concurrent executions and the rate at which a function can scale. The following list describes these limits.
- Account limit: 1,000 concurrent executions per Region by default, shared by all functions. It is a soft limit that can be raised.
- Scaling rate: each function can add up to 1,000 concurrent executions every 10 seconds, so a sudden spike can be throttled briefly. A queue in front of the function absorbs bursts.
When a request would exceed either limit, Lambda throttles it rather than running it. What happens next depends on the invocation model. A synchronous caller, such as API Gateway or an SDK client, receives an HTTP 429 TooManyRequestsException and must retry itself; API Gateway passes the error on to its client. For asynchronous invocations, Lambda returns the throttled event to its internal queue and retries it for up to the maximum event age, which is six hours by default, so short bursts cause delay rather than lost events. For an event source mapping, Lambda slows its polling; SQS messages that were already received become visible again after the visibility timeout, and stream records wait in the shard.
The Throttles metric counts throttled requests, and ConcurrentExecutions shows how close a function or account is to its limit. The following table summarises the behaviour for each invocation model.
| Invocation type | What happens when throttled |
|---|---|
| Synchronous | The caller receives 429 TooManyRequestsException |
| Asynchronous | Lambda retries the event automatically for up to 6 hours |
| Event source mapping | Lambda slows polling and retries; SQS messages become visible again |
1,000
Concurrent executions per Region by default
1,000every 10 s
Concurrent executions each function can add
6hours
Default maximum event age for throttled asynchronous events
What happens to a throttled request?
Reserved concurrency, provisioned concurrency and SnapStart
Lambda provides three features that influence how functions scale and start. They are frequently confused because all three concern concurrency or start-up, but each addresses a different requirement.
Reserved concurrency
Reserved concurrency sets aside part of the account's concurrency for one function and, at the same time, caps the function at that number. A function with a reserved concurrency of 100 can always run 100 concurrent executions, even when other functions are busy, and can never run more. The cap is often the main reason to use it: it protects a downstream resource, such as a relational database with a limited number of connections, from being overwhelmed. Setting reserved concurrency to 0 stops all invocations, which is a quick way to disable a misbehaving function. It costs nothing, but the reserved amount is no longer available to other functions.
Provisioned concurrency
Provisioned concurrency keeps a chosen number of execution environments initialised and ready, so requests served by them have no cold start. It is configured on a published version or an alias, never on $LATEST, and is billed for as long as it is configured, whether or not it is used. Requests above the provisioned amount still run, using standard on-demand environments with normal cold starts. Application Auto Scaling can adjust provisioned concurrency on a schedule, for example higher during business hours, or by target tracking on its utilisation.
SnapStart
SnapStart reduces cold-start time rather than eliminating cold starts. When a version is published, Lambda runs the function's initialisation code once, takes a snapshot of the initialised memory and disk, and caches it. New execution environments are then restored from the snapshot instead of repeating the initialisation. It suits functions with slow initialisation, such as Java applications that load large frameworks, and is supported for Java, Python and .NET. Because every environment starts from the same snapshot, values that must be unique, such as random seeds or network connections, must be created after the restore.
The following table summarises the three features.
$LATESTExample. Guarantee and cap a function at 100 concurrent executions, then keep 50 environments warm on the live alias:
aws lambda put-function-concurrency \
--function-name orders-api --reserved-concurrent-executions 100
aws lambda put-provisioned-concurrency-config \
--function-name orders-api --qualifier live --provisioned-concurrent-executions 50The following diagram uses the settings from the example above to show how reserved and provisioned concurrency divide the account's pool, and compares the three features.

Reserved, provisioned or SnapStart?
One function starving the others
During a marketing campaign, a public signup function scales to 900 concurrent executions. The account limit is 1,000, so the critical payments function is throttled and customers see errors at checkout.
| Fix | Setting |
|---|---|
| Guarantee capacity for payments | Reserved concurrency of 200 on payments |
| Stop signup taking everything | Reserved concurrency of 300 on signup (also a cap) |
| Remove cold starts on checkout | Provisioned concurrency of 50 on the payments live alias |
| Longer term | Request a higher account concurrency quota |
Reserved concurrency both reserves and caps: payments can always run 200 copies, and signup can never exceed 300. Throttled synchronous calls to signup now receive 429 errors, which the front end retries with backoff.
A function receives 200 requests per second, and each invocation takes 0.5 seconds. How many concurrent executions does it need?
Show answer
About 100. Concurrency is the request rate multiplied by the average duration in seconds: 200 × 0.5 = 100.
Exam Tips
Remember for the exam
- "Eliminate cold starts" points to provisioned concurrency.
- "Stop one function using all the account's concurrency" or "limit the load on a database" points to reserved concurrency.
- Estimate concurrency as requests per second × average duration in seconds.
- Scale provisioned concurrency with demand using Application Auto Scaling on the alias.
- Synchronous callers that are throttled receive a 429 error.