get_function_event_invoke_config

get_function_event_invoke_config(**kwargs)

Retrieves the configuration for asynchronous invocation for a function, version, or alias.

To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.

See also: AWS API Documentation

Request Syntax

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

    [REQUIRED]

    The name of the Lambda function, version, or alias.

    Name formats
    • Function name - my-function (name-only), my-function:v1 (with alias).
    • Function ARN - arn:aws:lambda:us-west-2:123456789012:function:my-function .
    • Partial ARN - 123456789012:function:my-function .

    You can append a version number or alias to any of the formats. 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) -- A version number or alias name.
Return type

dict

Returns

Response Syntax

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

Response Structure

  • (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 an SQS queue.
      • Topic - The ARN of an 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.

Exceptions

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

Examples

The following example returns the asynchronous invocation configuration for the BLUE alias of a function named my-function.

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

print(response)

Expected Output:

{
    'DestinationConfig': {
        'OnFailure': {
            'Destination': 'arn:aws:sqs:us-east-2:123456789012:failed-invocations',
        },
        'OnSuccess': {
        },
    },
    'FunctionArn': 'arn:aws:lambda:us-east-2:123456789012:function:my-function:BLUE',
    'LastModified': datetime(2016, 11, 21, 19, 49, 20, 0, 326, 0),
    'MaximumEventAgeInSeconds': 3600,
    'MaximumRetryAttempts': 0,
    'ResponseMetadata': {
        '...': '...',
    },
}