interface EventInvokeConfigOptions
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.Lambda.EventInvokeConfigOptions |
Java | software.amazon.awscdk.services.lambda.EventInvokeConfigOptions |
Python | aws_cdk.aws_lambda.EventInvokeConfigOptions |
TypeScript (source) | @aws-cdk/aws-lambda » EventInvokeConfigOptions |
Options to add an EventInvokeConfig to a function.
Example
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as lambda from '@aws-cdk/aws-lambda';
import * as cdk from '@aws-cdk/core';
declare const destination: lambda.IDestination;
const eventInvokeConfigOptions: lambda.EventInvokeConfigOptions = {
maxEventAge: cdk.Duration.minutes(30),
onFailure: destination,
onSuccess: destination,
retryAttempts: 123,
};
Properties
Name | Type | Description |
---|---|---|
max | Duration | The maximum age of a request that Lambda sends to a function for processing. |
on | IDestination | The destination for failed invocations. |
on | IDestination | The destination for successful invocations. |
retry | number | The maximum number of times to retry when the function returns an error. |
maxEventAge?
Type:
Duration
(optional, default: Duration.hours(6))
The maximum age of a request that Lambda sends to a function for processing.
Minimum: 60 seconds Maximum: 6 hours
onFailure?
Type:
IDestination
(optional, default: no destination)
The destination for failed invocations.
onSuccess?
Type:
IDestination
(optional, default: no destination)
The destination for successful invocations.
retryAttempts?
Type:
number
(optional, default: 2)
The maximum number of times to retry when the function returns an error.
Minimum: 0 Maximum: 2