Skip to content
v2.273.0

EventInvokeConfigProps Struct ​

Properties for an EventInvokeConfig.

Example ​

ts
// 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 ​

functionIFunctionfunctionIFunctionfunctionIFunctionFunctionIFunctionFunctionIFunctionrequired#
The Lambda function.
maxEventAgeDurationmax_event_ageDurationmaxEventAgeDurationMaxEventAgeDurationMaxEventAgeDuration= Duration.hours(6)#
The maximum age of a request that Lambda sends to a function for processing.

Minimum: 60 seconds Maximum: 6 hours

onFailureIDestinationon_failureIDestinationonFailureIDestinationOnFailureIDestinationOnFailureIDestination= no destination#
The destination for failed invocations.
onSuccessIDestinationon_successIDestinationonSuccessIDestinationOnSuccessIDestinationOnSuccessIDestination= no destination#
The destination for successful invocations.
qualifierstringqualifierstrqualifierStringQualifierstringQualifier*string= latest version#
The qualifier.
retryAttemptsnumberretry_attemptsint | floatretryAttemptsNumberRetryAttemptsdoubleRetryAttempts*float64= 2#
The maximum number of times to retry when the function returns an error.

Minimum: 0 Maximum: 2

Used as props by ​