get_provisioned_concurrency_config

get_provisioned_concurrency_config(**kwargs)

Retrieves the provisioned concurrency configuration for a function's alias or version.

See also: AWS API Documentation

Request Syntax

response = client.get_provisioned_concurrency_config(
    FunctionName='string',
    Qualifier='string'
)
Parameters
  • FunctionName (string) --

    [REQUIRED]

    The name of the Lambda function.

    Name formats
    • Function namemy-function .
    • Function ARNarn:aws:lambda:us-west-2:123456789012:function:my-function .
    • Partial ARN123456789012: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.

  • Qualifier (string) --

    [REQUIRED]

    The version number or alias name.

Return type

dict

Returns

Response Syntax

{
    'RequestedProvisionedConcurrentExecutions': 123,
    'AvailableProvisionedConcurrentExecutions': 123,
    'AllocatedProvisionedConcurrentExecutions': 123,
    'Status': 'IN_PROGRESS'|'READY'|'FAILED',
    'StatusReason': 'string',
    'LastModified': 'string'
}

Response Structure

  • (dict) --

    • RequestedProvisionedConcurrentExecutions (integer) --

      The amount of provisioned concurrency requested.

    • AvailableProvisionedConcurrentExecutions (integer) --

      The amount of provisioned concurrency available.

    • AllocatedProvisionedConcurrentExecutions (integer) --

      The amount of provisioned concurrency allocated. When a weighted alias is used during linear and canary deployments, this value fluctuates depending on the amount of concurrency that is provisioned for the function versions.

    • Status (string) --

      The status of the allocation process.

    • StatusReason (string) --

      For failed allocations, the reason that provisioned concurrency could not be allocated.

    • LastModified (string) --

      The date and time that a user last updated the configuration, in ISO 8601 format.

Exceptions

  • Lambda.Client.exceptions.InvalidParameterValueException
  • Lambda.Client.exceptions.ResourceNotFoundException
  • Lambda.Client.exceptions.TooManyRequestsException
  • Lambda.Client.exceptions.ServiceException
  • Lambda.Client.exceptions.ProvisionedConcurrencyConfigNotFoundException

Examples

The following example returns details for the provisioned concurrency configuration for the BLUE alias of the specified function.

response = client.get_provisioned_concurrency_config(
    FunctionName='my-function',
    Qualifier='BLUE',
)

print(response)

Expected Output:

{
    'AllocatedProvisionedConcurrentExecutions': 100,
    'AvailableProvisionedConcurrentExecutions': 100,
    'LastModified': '2019-12-31T20:28:49+0000',
    'RequestedProvisionedConcurrentExecutions': 100,
    'Status': 'READY',
    'ResponseMetadata': {
        '...': '...',
    },
}

The following example displays details for the provisioned concurrency configuration for the BLUE alias of the specified function.

response = client.get_provisioned_concurrency_config(
    FunctionName='my-function',
    Qualifier='BLUE',
)

print(response)

Expected Output:

{
    'AllocatedProvisionedConcurrentExecutions': 100,
    'AvailableProvisionedConcurrentExecutions': 100,
    'LastModified': '2019-12-31T20:28:49+0000',
    'RequestedProvisionedConcurrentExecutions': 100,
    'Status': 'READY',
    'ResponseMetadata': {
        '...': '...',
    },
}