# EventInvokeConfigProps

Properties for an EventInvokeConfig.

Extends: EventInvokeConfigProps
Extends: EventInvokeConfigOptions
Used as props by: EventInvokeConfig

- Source: [`aws-lambda/lib/event-invoke-config.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/aws-lambda/lib/event-invoke-config.ts#L56)

## 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

- `function`: [IFunction](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IFunction.html) (required) — The Lambda function.

- `maxEventAge`: [Duration](/cdk/api/v2/docs/aws-cdk-lib.Duration.html) = Duration.hours(6) — The maximum age of a request that Lambda sends to a function for processing.

  Minimum: 60 seconds
  Maximum: 6 hours

- `onFailure`: [IDestination](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IDestination.html) — The destination for failed invocations.

  **Default:** no destination

- `onSuccess`: [IDestination](/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.IDestination.html) — The destination for successful invocations.

  **Default:** no destination

- `qualifier`: string — The qualifier.

  **Default:** latest version

- `retryAttempts`: number = 2 — The maximum number of times to retry when the function returns an error.

  Minimum: 0
  Maximum: 2
