AWS Fundamentals Logo
AWS Fundamentals
L1 ConstructAWS::Lambda::EventInvokeConfig

CfnEventInvokeConfig

The `AWS::Lambda::EventInvokeConfig` resource configures options for [asynchronous invocation](https://docs.aws.amazon.com/lambda/latest/dg/invocation-async.html) 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 { CfnEventInvokeConfig } from 'aws-cdk-lib/aws-lambda';

Or use the module namespace:

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

Properties

Configuration passed to the constructor as CfnEventInvokeConfigProps.

functionNameRequired
string | IFunctionRef

The name of the Lambda function. *Minimum* : `1` *Maximum* : `64` *Pattern* : `([a-zA-Z0-9-_]+)`

qualifierRequired
string

The identifier of a version or alias. - *Version* - A version number. - *Alias* - An alias name. - *Latest* - To specify the unpublished version, use `$LATEST` .

destinationConfigOptional
IResolvable | DestinationConfigProperty

A destination for events after they have been sent to a function for processing. **Destinations** - *Function* - The Amazon Resource Name (ARN) of a Lambda function. - *Queue* - The ARN of a standard SQS queue. - *Bucket* - The ARN of an Amazon S3 bucket. - *Topic* - The ARN of a standard SNS topic. - *Event Bus* - The ARN of an Amazon EventBridge event bus. > S3 buckets are supported only for on-failure destinations. To retain records of successful invocations, use another destination type.

maximumEventAgeInSecondsOptional
number

The maximum age of a request that Lambda sends to a function for processing.

maximumRetryAttemptsOptional
number

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

CloudFormation Resource

This L1 construct maps directly to the following CloudFormation resource type.

Get the AWS Lambda Cheat Sheet

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

Download Free Infographic