Lambda reserved concurrency vs provisioned concurrency
Reserved concurrency sets both a guaranteed minimum and a hard maximum of concurrent executions for one function, carved out of the account's pool, at no extra cost; use it to protect critical functions and to cap ones that hit fragile downstreams. Provisioned concurrency keeps a number of execution environments initialised and ready on a specific version or alias to remove cold starts, and is billed while configured. They can be combined, but provisioned can't exceed reserved, and both count against the account concurrency limit.
Side by side
| Reserved concurrency | Provisioned concurrency | |
|---|---|---|
| What it does | Reserves capacity and caps the function at that number | Keeps N environments initialised and warm |
| Cold starts | Doesn't prevent them | Removes them up to N concurrent requests |
| Applies to | The whole function (all versions) | A published version or alias, not $LATEST |
| Cost | Free | Charged per GB-second while configured, plus invocations |
| Limit | Account limit minus 100 unreserved | Can't exceed the function's reserved concurrency, if set |
| Takes effect | Immediately | After allocation (a minute or two, then up to 6,000 environments per minute) |
| Over the limit | Throttled (429) | Spills over to on-demand concurrency (with cold starts) unless capped by reserved |
| Setting 0 | Throttles every invocation (an emergency off switch) | Removes the configuration |
Lambda keeps at least 100 units of the account limit unreserved, so with the default 1,000 you can reserve up to 900 across all functions.
When to use which
| Need | Use |
|---|---|
| A critical function must always be able to scale to N | Reserved N |
| Stop a function overwhelming a database or API | Reserved at a safe cap |
| Stop a misbehaving function now | Reserved 0 |
| p99 latency matters for user-facing APIs and cold starts are seconds | Provisioned on the live alias |
| Predictable daily peaks | Provisioned with Application Auto Scaling (schedule or utilisation target) |
| Async or batch processing | Neither, usually; SQS maximum concurrency on the event source mapping caps consumers |
Configure them
# Reserve 100 for a function (also caps it at 100)
aws lambda put-function-concurrency --function-name orders-api --reserved-concurrent-executions 100
# Remove the reservation
aws lambda delete-function-concurrency --function-name orders-api
# Keep 20 warm environments on the live alias
aws lambda put-provisioned-concurrency-config --function-name orders-api --qualifier live \
--provisioned-concurrent-executions 20
aws lambda get-provisioned-concurrency-config --function-name orders-api --qualifier live \
--query '{requested:RequestedProvisionedConcurrentExecutions,ready:AvailableProvisionedConcurrentExecutions,status:Status}'CloudFormation: ReservedConcurrentExecutions on AWS::Lambda::Function; ProvisionedConcurrencyConfig with ProvisionedConcurrentExecutions on AWS::Lambda::Alias or AWS::Lambda::Version. In SAM, ProvisionedConcurrencyConfig with AutoPublishAlias. Terraform: reserved_concurrent_executions on aws_lambda_function; aws_lambda_provisioned_concurrency_config with provisioned_concurrent_executions and qualifier.
Mistakes that cause incidents
- Reserving too low: the reservation is also a ceiling. A function reserved at 10 throttles at the 11th concurrent request even when the account has 900 free. Check
Throttlesafter any change. - Provisioned on $LATEST: not allowed; traffic must go through the alias or version that has the configuration, or every request is on-demand.
- Provisioned equal to reserved: all invocations run on provisioned concurrency and the unpublished
$LATESTversion is throttled. - Forgetting the bill: provisioned concurrency is charged around the clock unless scaled down; use scheduled scaling for business hours.
- Ignoring spillover: monitor
ProvisionedConcurrencySpilloverInvocationsandProvisionedConcurrencyUtilization; sustained spillover means you need more provisioned capacity.
Questions
What is the difference between reserved and provisioned concurrency in Lambda?
Reserved concurrency guarantees and caps how many concurrent executions a function can have, at no cost. Provisioned concurrency keeps environments pre-initialised to avoid cold starts and is billed while configured.
Does reserved concurrency cost money?
No. Reserved concurrency is free. Provisioned concurrency is charged.
Can I use reserved and provisioned concurrency together?
Yes. Reserved concurrency caps the function and provisioned concurrency keeps part of that capacity warm; provisioned can't exceed reserved.
The wrong reserved value tends to surface as sudden throttling after a config change. CloudConsole, a phone app for AWS, is being built to show Lambda throttle and error alarms on your phone.
About the app → · Download on the App Store