AWS Lambda

2019/12/04 - AWS Lambda - 5 new api methods

Changes  - Added the ProvisionedConcurrency type and operations. Allocate provisioned concurrency to enable your function to scale up without fluctuations in latency. Use PutProvisionedConcurrencyConfig to configure provisioned concurrency on a version of a function, or on an alias.

DeleteProvisionedConcurrencyConfig (new) Link ¶

Deletes the provisioned concurrency configuration for a function.

See also: AWS API Documentation

Request Syntax

client.delete_provisioned_concurrency_config(
    FunctionName='string',
    Qualifier='string'
)
type FunctionName

string

param FunctionName

[REQUIRED]

The name 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.

type Qualifier

string

param Qualifier

[REQUIRED]

The version number or alias name.

returns

None

ListProvisionedConcurrencyConfigs (new) Link ¶

Retrieves a list of provisioned concurrency configurations for a function.

See also: AWS API Documentation

Request Syntax

client.list_provisioned_concurrency_configs(
    FunctionName='string',
    Marker='string',
    MaxItems=123
)
type FunctionName

string

param FunctionName

[REQUIRED]

The name 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.

type Marker

string

param Marker

Specify the pagination token that's returned by a previous request to retrieve the next page of results.

type MaxItems

integer

param MaxItems

Specify a number to limit the number of configurations returned.

rtype

dict

returns

Response Syntax

{
    'ProvisionedConcurrencyConfigs': [
        {
            'FunctionArn': 'string',
            'RequestedProvisionedConcurrentExecutions': 123,
            'AvailableProvisionedConcurrentExecutions': 123,
            'AllocatedProvisionedConcurrentExecutions': 123,
            'Status': 'IN_PROGRESS'|'READY'|'FAILED',
            'StatusReason': 'string',
            'LastModified': 'string'
        },
    ],
    'NextMarker': 'string'
}

Response Structure

  • (dict) --

    • ProvisionedConcurrencyConfigs (list) --

      A list of provisioned concurrency configurations.

      • (dict) --

        Details about the provisioned concurrency configuration for a function alias or version.

        • FunctionArn (string) --

          The Amazon Resource Name (ARN) of the alias or version.

        • RequestedProvisionedConcurrentExecutions (integer) --

          The amount of provisioned concurrency requested.

        • AvailableProvisionedConcurrentExecutions (integer) --

          The amount of provisioned concurrency available.

        • AllocatedProvisionedConcurrentExecutions (integer) --

          The amount of provisioned concurrency allocated.

        • 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.

    • NextMarker (string) --

      The pagination token that's included if more results are available.

GetProvisionedConcurrencyConfig (new) Link ¶

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

See also: AWS API Documentation

Request Syntax

client.get_provisioned_concurrency_config(
    FunctionName='string',
    Qualifier='string'
)
type FunctionName

string

param FunctionName

[REQUIRED]

The name 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.

type Qualifier

string

param Qualifier

[REQUIRED]

The version number or alias name.

rtype

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.

    • 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.

PutProvisionedConcurrencyConfig (new) Link ¶

Adds a provisioned concurrency configuration to a function's alias or version.

See also: AWS API Documentation

Request Syntax

client.put_provisioned_concurrency_config(
    FunctionName='string',
    Qualifier='string',
    ProvisionedConcurrentExecutions=123
)
type FunctionName

string

param FunctionName

[REQUIRED]

The name 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.

type Qualifier

string

param Qualifier

[REQUIRED]

The version number or alias name.

type ProvisionedConcurrentExecutions

integer

param ProvisionedConcurrentExecutions

[REQUIRED]

The amount of provisioned concurrency to allocate for the version or alias.

rtype

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.

    • 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.

GetFunctionConcurrency (new) Link ¶

Returns details about the concurrency configuration for a function. To set a concurrency limit for a function, use PutFunctionConcurrency.

See also: AWS API Documentation

Request Syntax

client.get_function_concurrency(
    FunctionName='string'
)
type FunctionName

string

param FunctionName

[REQUIRED]

The name 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.

rtype

dict

returns

Response Syntax

{
    'ReservedConcurrentExecutions': 123
}

Response Structure

  • (dict) --

    • ReservedConcurrentExecutions (integer) --

      The number of simultaneous executions that are reserved for the function.