Skip to content

LambdaCodeHookEventSource

Source: src/AWS/LexV2/LambdaCodeHookEventSource.ts

Connects an Amazon Lex V2 bot alias’s Lambda code hook to the current Lambda function.

At deploy time this layer injects the function ARN into the alias’s botAliasLocaleSettings through the alias’s binding contract and materializes the lambda:InvokeFunction Permission for lexv2.amazonaws.com; at runtime it dispatches matching code hook events (matched on the bot id, alias id, and locale) to the registered handler and returns the handler’s response to Lex.

yield* LexV2.onCodeHook(alias, { localeId: "en_US" }, (event) =>
Effect.succeed(LexV2.fulfillIntent(event, { message: "Done!" })),
);