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 { EventInvokeConfig } from 'aws-cdk-lib/aws-lambda';Or use the module namespace:
import * as lambda from 'aws-cdk-lib/aws-lambda';
// lambda.EventInvokeConfigConfiguration passed to the constructor as EventInvokeConfigProps.
functionRequiredIFunctionThe Lambda function.
qualifierOptionalstringThe qualifier.
Default: - latest version
EventInvokeConfigOptionsmaxEventAgeOptionalinherited from EventInvokeConfigOptionsDurationThe 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 EventInvokeConfigOptionsIDestinationThe destination for failed invocations.
Default: - no destination
onSuccessOptionalinherited from EventInvokeConfigOptionsIDestinationThe destination for successful invocations.
Default: - no destination
retryAttemptsOptionalinherited from EventInvokeConfigOptionsnumberThe maximum number of times to retry when the function returns an error. Minimum: 0 Maximum: 2
Default: 2
Everything you need to know about AWS Lambda on one page. HD quality, print-friendly.
Download Free Infographicaws-lambda