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