update_function_event_invoke_config
async
¶
update_function_event_invoke_config(
function_name: NamespacedFunctionName,
*,
config_overrides: Optional[AsyncLambdaClientConfig] = None,
qualifier: Optional[NumericLatestPublishedOrAliasQualifier] = None,
maximum_retry_attempts: Optional[MaximumRetryAttempts] = None,
maximum_event_age_in_seconds: Optional[MaximumEventAgeInSeconds] = None,
destination_config: Optional[DestinationConfig] = None,
) -> FunctionEventInvokeConfig
Updates the configuration for asynchronous invocation for a function, version, or alias.
To configure options for asynchronous invocation, use PutFunctionEventInvokeConfig.
Parameters:
-
function_name(NamespacedFunctionName) –The name or ARN 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(Optional[NumericLatestPublishedOrAliasQualifier], default:None) –A version number or alias name.
-
maximum_retry_attempts(Optional[MaximumRetryAttempts], default:None) –The maximum number of times to retry when the function returns an error.
-
maximum_event_age_in_seconds(Optional[MaximumEventAgeInSeconds], default:None) –The maximum age of a request that Lambda sends to a function for processing.
-
destination_config(Optional[DestinationConfig], default:None) –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.
-
Bucket - The ARN of an Amazon S3 bucket.
-
Topic - The ARN of a standard SNS topic.
-
Event Bus - The ARN of an Amazon EventBridge event bus.
S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.
-
Raises:
-
InvalidParameterValueException–One of the parameters in the request is not valid.
-
ResourceConflictException–The resource already exists, or another operation is in progress.
-
ResourceNotFoundException–The resource specified in the request does not exist.
-
ServiceException–The Lambda service encountered an internal error.
-
TooManyRequestsException–The request throughput limit was exceeded. For more information, see Lambda quotas.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To update an asynchronous invocation configuration The following example adds an on-failure destination to the existing asynchronous invocation configuration for a function named my-function.
>>> await client.update_function_event_invoke_config(destination_config={'OnFailure': {'Destination': 'arn:aws:sqs:us-east-2:123456789012:destination'}}, function_name='my-function')
Source code in docs_src/capo_lambda/_services/async__lambda.py
1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 | |