终止支持通知:2025年9月15日, AWS 我们将停止对Amazon Lex V1的支持。2025 年 9 月 15 日之后,您将无法再访问亚马逊 Lex V1 主机或 Amazon Lex V1 资源。如果您使用的是 Amazon Lex V2,请改为参阅 Amazon Lex V2 指南。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
别名是指向自动程序特定版本的指针。利用别名,您可以轻松更新您的客户端应用程序正在使用的版本。有关详细信息,请参阅版本控制和别名。要运行本练习中的命令,您需要知道将在其中运行命令的区域。有关区域列表,请参阅 模型构建配额 。
创建别名 (AWS CLI)
-
在中 AWS CLI,获取你在中创建的
OrderFlowersBot
机器人的版本练习 4:发布版本 (AWS CLI)。aws lex-models get-bot \ --region
region
\ --name OrderFlowersBot \ --version-or-aliasversion
> OrderFlowersBot_V5.json -
在文本编辑器中,打开
OrderFlowersBot_v5.json
。找到并记录版本号。 -
在中 AWS CLI,创建机器人别名:
aws lex-models put-bot-alias \ --region
region
\ --name PROD \ --bot-name OrderFlowersBot \ --bot-versionversion
服务器响应如下:
{ "name": "PROD", "createdDate":
timestamp
, "checksum": "checksum
", "lastUpdatedDate":timestamp
, "botName": "OrderFlowersBot", "botVersion": "1" }}