AWS Fundamentals Logo
AWS Fundamentals
L2 Construct

EventInvokeConfig

Configure options for asynchronous invocation on a version or an alias. By default, Lambda retries an asynchronous invocation twice if the function returns an error. It retains events in a queue for up to six hours. When an event fails all processing attempts or stays in the asynchronous invocation queue for too long, Lambda discards it.

Import

import { EventInvokeConfig } from 'aws-cdk-lib/aws-lambda';

Or use the module namespace:

import * as lambda from 'aws-cdk-lib/aws-lambda';
// lambda.EventInvokeConfig

Properties

Configuration passed to the constructor as EventInvokeConfigProps.

functionRequired
IFunction

The Lambda function.

qualifierOptional
string

The qualifier.

Default: - latest version

4 properties inherited from EventInvokeConfigOptions
maxEventAgeOptionalinherited from EventInvokeConfigOptions
Duration

The maximum age of a request that Lambda sends to a function for processing. Minimum: 60 seconds Maximum: 6 hours

Default: Duration.hours(6)

onFailureOptionalinherited from EventInvokeConfigOptions
IDestination

The destination for failed invocations.

Default: - no destination

onSuccessOptionalinherited from EventInvokeConfigOptions
IDestination

The destination for successful invocations.

Default: - no destination

retryAttemptsOptionalinherited from EventInvokeConfigOptions
number

The maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2

Default: 2

Get the AWS Lambda Cheat Sheet

Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.

Download Free Infographic