InvocationType

class aws_cdk.triggers.InvocationType(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: 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.

ExampleMetadata:

infused

Example:

import aws_cdk.triggers as triggers


func = lambda_.Function(self, "MyFunction",
    handler="index.handler",
    runtime=lambda_.Runtime.NODEJS_18_X,
    code=lambda_.Code.from_inline("foo")
)

triggers.Trigger(self, "MyTrigger",
    handler=func,
    timeout=Duration.minutes(10),
    invocation_type=triggers.InvocationType.EVENT
)

Attributes

DRY_RUN

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