aws-cdk-lib.aws_lambda.EventInvokeConfigProps

interface EventInvokeConfigProps

LanguageType name
.NETAmazon.CDK.AWS.Lambda.EventInvokeConfigProps
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awslambda#EventInvokeConfigProps
Javasoftware.amazon.awscdk.services.lambda.EventInvokeConfigProps
Pythonaws_cdk.aws_lambda.EventInvokeConfigProps
TypeScript (source)aws-cdk-lib » aws_lambda » EventInvokeConfigProps

Properties for an EventInvokeConfig.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import * as cdk from 'aws-cdk-lib';
import { aws_lambda as lambda } from 'aws-cdk-lib';

declare const destination: lambda.IDestination;
declare const function_: lambda.Function;
const eventInvokeConfigProps: lambda.EventInvokeConfigProps = {
  function: function_,

  // the properties below are optional
  maxEventAge: cdk.Duration.minutes(30),
  onFailure: destination,
  onSuccess: destination,
  qualifier: 'qualifier',
  retryAttempts: 123,
};

Properties

NameTypeDescription
functionIFunctionThe Lambda function.
maxEventAge?DurationThe maximum age of a request that Lambda sends to a function for processing.
onFailure?IDestinationThe destination for failed invocations.
onSuccess?IDestinationThe destination for successful invocations.
qualifier?stringThe qualifier.
retryAttempts?numberThe maximum number of times to retry when the function returns an error.

function

Type: IFunction

The Lambda function.


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.


qualifier?

Type: string (optional, default: latest version)

The qualifier.


retryAttempts?

Type: number (optional, default: 2)

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

Minimum: 0 Maximum: 2