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

- Source: [`triggers/lib/trigger.ts`](https://github.com/aws/aws-cdk/blob/v2.275.0/packages/aws-cdk-lib/triggers/lib/trigger.ts#L68)
- Type last changed: v2.73.0 · 6 Apr 2023

## 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

| Member | Description |
| --- | --- |
| `EVENT` | Invoke the function asynchronously. |
| `REQUEST_RESPONSE` | Invoke the function synchronously. |
| `DRY_RUN` | Validate parameter values and verify that the user or role has permission to invoke the function. |

## Referenced by

- [`TriggerProps`](/v2/docs/aws-cdk-lib.triggers.TriggerProps).invocationType
