update_function_event_invoke_config - Boto3 1.38.13 documentation (original) (raw)

Toggle table of contents sidebar

Lambda / Client / update_function_event_invoke_config

Lambda.Client.update_function_event_invoke_config(**kwargs)

Updates 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.update_function_event_invoke_config( FunctionName='string', Qualifier='string', MaximumRetryAttempts=123, MaximumEventAgeInSeconds=123, DestinationConfig={ 'OnSuccess': { 'Destination': 'string' }, 'OnFailure': { 'Destination': 'string' } } )

Parameters:

Name formats

Destinations

Note

S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.

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

Exceptions

Examples

The following example adds an on-failure destination to the existing asynchronous invocation configuration for a function named my-function.

response = client.update_function_event_invoke_config( DestinationConfig={ 'OnFailure': { 'Destination': 'arn:aws:sqs:us-east-2:123456789012:destination', }, }, FunctionName='my-function', )

print(response)

Expected Output:

{ 'DestinationConfig': { 'OnFailure': { 'Destination': 'arn:aws:sqs:us-east-2:123456789012:destination', }, 'OnSuccess': { }, }, 'FunctionArn': 'arn:aws:lambda:us-east-2:123456789012:function:my-function:$LATEST', 'LastModified': 1573687896.493, 'MaximumEventAgeInSeconds': 3600, 'MaximumRetryAttempts': 0, 'ResponseMetadata': { '...': '...', }, }