Skip to content
v2.274.0

InvocationType Enum ​

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 ​

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

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

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

Members ​

MemberDescription
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.

Referenced by ​

  • TriggerProps.invocationTypeinvocation_typeinvocationTypeInvocationTypeInvocationType