function_concurrencies
Creates, updates, deletes, gets or lists a function_concurrencies resource.
Overview
| Name | function_concurrencies |
| Type | Resource |
| Id | aws.lambda.function_concurrencies |
Fields
The following fields are returned by SELECT queries:
- get_function_concurrency
| Name | Datatype | Description |
|---|---|---|
reserved_concurrent_executions | integer | The number of simultaneous executions that are reserved for the function. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get_function_concurrency | select | function_name, region | Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use PutFunctionConcurrency. | |
put_function_concurrency | replace | function_name, region, ReservedConcurrentExecutions | Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level. Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use GetFunction to see the current setting for a function. Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see Lambda function scaling. | |
delete_function_concurrency | delete | function_name, region | Removes a concurrent execution limit from a function. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
function_name | string | The name or ARN of the Lambda function. Name formats Function name – my-function. Function ARN – arn:aws:lambda:us-west-2:123456789012:function:my-function. Partial ARN – 123456789012:function:my-function. The length constraint applies only to the full ARN. If you specify only the function name, it is limited to 64 characters in length. |
region | string | AWS region (default: us-east-1) |
SELECT examples
- get_function_concurrency
Returns details about the reserved concurrency configuration for a function. To set a concurrency limit for a function, use PutFunctionConcurrency.
SELECT
reserved_concurrent_executions
FROM aws.lambda.function_concurrencies
WHERE function_name = '{{ function_name }}' -- required
AND region = '{{ region }}' -- required
;
REPLACE examples
- put_function_concurrency
Sets the maximum number of simultaneous executions for a function, and reserves capacity for that concurrency level. Concurrency settings apply to the function as a whole, including all published versions and the unpublished version. Reserving concurrency both ensures that your function has capacity to process the specified number of events simultaneously, and prevents it from scaling beyond that level. Use GetFunction to see the current setting for a function. Use GetAccountSettings to see your Regional concurrency limit. You can reserve concurrency for as many functions as you like, as long as you leave at least 100 simultaneous executions unreserved for functions that aren't configured with a per-function limit. For more information, see Lambda function scaling.
REPLACE aws.lambda.function_concurrencies
SET
ReservedConcurrentExecutions = {{ ReservedConcurrentExecutions }}
WHERE
function_name = '{{ function_name }}' --required
AND region = '{{ region }}' --required
AND ReservedConcurrentExecutions = '{{ ReservedConcurrentExecutions }}' --required
RETURNING
reserved_concurrent_executions;
DELETE examples
- delete_function_concurrency
Removes a concurrent execution limit from a function.
DELETE FROM aws.lambda.function_concurrencies
WHERE function_name = '{{ function_name }}' --required
AND region = '{{ region }}' --required
;