aws-cdk-lib.triggers.InvocationType

enum InvocationType

LanguageType name
.NETAmazon.CDK.Triggers.InvocationType
Gogithub.com/aws/aws-cdk-go/awscdk/v2/triggers#InvocationType
Javasoftware.amazon.awscdk.triggers.InvocationType
Pythonaws_cdk.triggers.InvocationType
TypeScript (source)aws-cdk-lib » triggers » InvocationType

The invocation type to apply to a trigger.

This determines whether the trigger function should await the result of the to be triggered function or not.

Example

import * as triggers from 'aws-cdk-lib/triggers';

const func = new lambda.Function(this, 'MyFunction', {
  handler: 'index.handler',
  runtime: lambda.Runtime.NODEJS_14_X,
  code: lambda.Code.fromInline('foo'),
});

new triggers.Trigger(this, 'MyTrigger', {
  handler: func,
  timeout: Duration.minutes(10),
  invocationType: triggers.InvocationType.EVENT,
});

Members

NameDescription
EVENTInvoke the function asynchronously.
REQUEST_RESPONSEInvoke the function synchronously.
DRY_RUNValidate parameter values and verify that the user or role has permission to invoke the function.

EVENT

Invoke the function asynchronously.

Send events that fail multiple times to the function's dead-letter queue (if one is configured). The API response only includes a status code.


REQUEST_RESPONSE

Invoke the function synchronously.

Keep the connection open until the function returns a response or times out. The API response includes the function response and additional data.


DRY_RUN

Validate parameter values and verify that the user or role has permission to invoke the function.