BotAlias
Source:
src/AWS/LexV2/BotAlias.ts
An alias of an Amazon Lex V2 bot — a stable pointer to a numbered bot
version that runtime conversations (e.g. RecognizeText) target.
Creating an Alias
Section titled “Creating an Alias”Alias on a Version
import * as AWS from "alchemy/AWS";
const alias = yield* AWS.LexV2.BotAlias("Live", { botId: version.botId, botVersion: version.botVersion,});Unassociated Alias
// point it at a version later without changing consumersconst alias = yield* AWS.LexV2.BotAlias("Staging", { botId: bot.botId,});Conversing at Runtime
Section titled “Conversing at Runtime”const recognizeText = yield* AWS.LexV2.RecognizeText(alias);const reply = yield* recognizeText({ localeId: "en_US", sessionId: "user-123", text: "hello",});