Lambda / Client / list_function_event_invoke_configs

list_function_event_invoke_configs#

Lambda.Client.list_function_event_invoke_configs(**kwargs)#

Retrieves a list of configurations for asynchronous invocation for a function.

To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

See also: AWS API Documentation

Request Syntax

response = client.list_function_event_invoke_configs(
    FunctionName='string',
    Marker='string',
    MaxItems=123
)
Parameters:
  • FunctionName (string) –

    [REQUIRED]

    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.

  • Marker (string) – Specify the pagination token that’s returned by a previous request to retrieve the next page of results.

  • MaxItems (integer) – The maximum number of configurations to return.

Return type:

dict

Returns:

Response Syntax

{
    'FunctionEventInvokeConfigs': [
        {
            'LastModified': datetime(2015, 1, 1),
            'FunctionArn': 'string',
            'MaximumRetryAttempts': 123,
            'MaximumEventAgeInSeconds': 123,
            'DestinationConfig': {
                'OnSuccess': {
                    'Destination': 'string'
                },
                'OnFailure': {
                    'Destination': 'string'
                }
            }
        },
    ],
    'NextMarker': 'string'
}

Response Structure

  • (dict) –

    • FunctionEventInvokeConfigs (list) –

      A list of configurations.

      • (dict) –

        • LastModified (datetime) –

          The date and time that the configuration was last updated.

        • FunctionArn (string) –

          The Amazon Resource Name (ARN) of the function.

        • MaximumRetryAttempts (integer) –

          The maximum number of times to retry when the function returns an error.

        • MaximumEventAgeInSeconds (integer) –

          The maximum age of a request that Lambda sends to a function for processing.

        • DestinationConfig (dict) –

          A destination for events after they have been sent to a function for processing.

          Destinations

          • Function - The Amazon Resource Name (ARN) of a Lambda function.

          • Queue - The ARN of a standard SQS queue.

          • Topic - The ARN of a standard SNS topic.

          • Event Bus - The ARN of an Amazon EventBridge event bus.

          • OnSuccess (dict) –

            The destination configuration for successful invocations.

            • Destination (string) –

              The Amazon Resource Name (ARN) of the destination resource.

          • OnFailure (dict) –

            The destination configuration for failed invocations.

            • Destination (string) –

              The Amazon Resource Name (ARN) of the destination resource.

              To retain records of asynchronous invocations, you can configure an Amazon SNS topic, Amazon SQS queue, Lambda function, or Amazon EventBridge event bus as the destination.

              To retain records of failed invocations from Kinesis and DynamoDB event sources, you can configure an Amazon SNS topic or Amazon SQS queue as the destination.

              To retain records of failed invocations from self-managed Kafka or Amazon MSK, you can configure an Amazon SNS topic, Amazon SQS queue, or Amazon S3 bucket as the destination.

    • NextMarker (string) –

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

Exceptions

  • Lambda.Client.exceptions.InvalidParameterValueException

  • Lambda.Client.exceptions.ResourceNotFoundException

  • Lambda.Client.exceptions.TooManyRequestsException

  • Lambda.Client.exceptions.ServiceException

Examples

The following example returns a list of asynchronous invocation configurations for a function named my-function.

response = client.list_function_event_invoke_configs(
    FunctionName='my-function',
)

print(response)

Expected Output:

{
    'FunctionEventInvokeConfigs': [
        {
            'FunctionArn': 'arn:aws:lambda:us-east-2:123456789012:function:my-function:GREEN',
            'LastModified': 1577824406.719,
            'MaximumEventAgeInSeconds': 1800,
            'MaximumRetryAttempts': 2,
        },
        {
            'FunctionArn': 'arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE',
            'LastModified': 1577824396.653,
            'MaximumEventAgeInSeconds': 3600,
            'MaximumRetryAttempts': 0,
        },
    ],
    'ResponseMetadata': {
        '...': '...',
    },
}