Cap a Function with Reserved Concurrency
A 3-step recipe with AWS Lambda. We can help you get access.
Recipe · 3 steps
Cap a Function with Reserved Concurrency
with AWS Lambda
Set and verify the maximum simultaneous executions reserved for a function.
- Read the existing reservation before changing it, so the prior value is captured for audit and rollback. A function with no reservation returns no ReservedConcurrentExecutions value and draws from the shared account pool.
- Set the ceiling. This carves the reserved amount out of the account's regional concurrency pool, so the capacity is no longer available to any other function in the account.
- Read the reservation back to confirm the ceiling Lambda actually stored matches what was requested.
What you'll need to have ready
- functionName: The name or ARN of the function to cap.
- reservedConcurrentExecutions: Maximum simultaneous executions for this function. Setting 0 stops the function from being invoked at all, which is the standard way to quarantine a misbehaving
For your developer
Arazzo workflow aws-lambda:reserved-concurrency-guardrail, 3 operations: getReservedConcurrency → PutFunctionConcurrency → getReservedConcurrency. Specs on APIs.io.