reserved_concurrent_executions
Reserved concurrency limit for the function. Use -1 for no limit, 0 to disable.
Example
reserved_concurrent_executions = -1Concurrency Values
| Value | Behavior |
|---|---|
-1 | No reserved concurrency (default) |
0 | Function is disabled |
1+ | Reserved concurrent executions |
Use Cases
- Rate limiting: Protect downstream resources
- Cost control: Limit execution costs
- Throttling: Control function invocation rate
- Disable function: Set to 0 for maintenance
Best Practices
- Monitor
Throttlesmetric in CloudWatch - Set reserved concurrency for functions with database connections
- Leave some unreserved concurrency for other functions
- Use provisioned concurrency for latency-sensitive workloads
Full Module Example
module "lambda_function" {
source = "registry.patterneddesigns.ca/patterneddesigns/lambda-function/aws"
version = "0.1.0"
# reserved_concurrent_executions
reserved_concurrent_executions = -1
# Other required inputs
function_name = my-resource
runtime = python3.9
handler = example-value
source_path = /path/to/resource
}