put_function_concurrency - Boto3 1.38.13 documentation (original) (raw)

Toggle table of contents sidebar

Lambda / Client / put_function_concurrency

Lambda.Client.put_function_concurrency(**kwargs)

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.

See also: AWS API Documentation

Request Syntax

response = client.put_function_concurrency( FunctionName='string', ReservedConcurrentExecutions=123 )

Parameters:

Name formats

Return type:

dict

Returns:

Response Syntax

{ 'ReservedConcurrentExecutions': 123 }

Response Structure

Exceptions

Examples

The following example configures 100 reserved concurrent executions for the my-function function.

response = client.put_function_concurrency( FunctionName='my-function', ReservedConcurrentExecutions=100, )

print(response)

Expected Output:

{ 'ReservedConcurrentExecutions': 100, 'ResponseMetadata': { '...': '...', }, }