Skip to content

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.

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 consumers
const alias = yield* AWS.LexV2.BotAlias("Staging", {
botId: bot.botId,
});
const recognizeText = yield* AWS.LexV2.RecognizeText(alias);
const reply = yield* recognizeText({
localeId: "en_US",
sessionId: "user-123",
text: "hello",
});