

终止支持通知：2025年9月15日， AWS 我们将停止对Amazon Lex V1的支持。2025 年 9 月 15 日之后，您将无法再访问 Amazon Lex V1 控制台或 Amazon Lex V1 资源。如果您使用的是 Amazon Lex V2，请改为参阅 [Amazon Lex V2 指南](https://docs.aws.amazon.com/lexv2/latest/dg/what-is.html)。

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# Amazon Lex 中的监控
<a name="monitoring-aws-lex"></a>

要维护 Amazon Lex 对话聊天机器人的可靠性、可用性和性能，实施监控非常重要。本主题介绍如何使用亚马逊 CloudWatch 日志和 AWS CloudTrail 监控 Amazon Lex，并介绍了 Amazon Lex 运行时和频道关联指标。

**Topics**
+ [使用亚马逊监控 Amazon Lex CloudWatch](monitoring-aws-lex-cloudwatch.md)
+ [使用 AWS CloudTrail 日志监控 Amazon Lex API 调用](monitoring-aws-lex-cloudtrail.md)

# 使用亚马逊监控 Amazon Lex CloudWatch
<a name="monitoring-aws-lex-cloudwatch"></a>

要追踪您的 Amazon Lex 机器人的运行状况，请使用亚马逊 CloudWatch。借助 CloudWatch，您可以获取账户中各个 Amazon Lex 操作或全球 Amazon Lex 运营的指标。您还可以设置 CloudWatch 警报，以便在一个或多个指标超过您定义的阈值时收到通知。例如，您可以监控特定时间段内向机器人发出的请求数量，查看成功请求的延迟，或者在错误超过阈值时发出警报。

## CloudWatch Amazon Lex 的指标
<a name="aws-lex-cloudwatch-using"></a>

要获取 Amazon Lex 操作的指标，必须指定以下信息：
+ 指标维度。*维度*是用来标识指标的一组名称/值对。Amazon Lex 有三个维度：
  + `BotAlias, BotName, Operation`
  + `BotAlias, BotName, InputMode, Operation`
  + `BotName, BotVersion, InputMode, Operation`
+ 指标名称，如 `MissedUtteranceCount` 或 `RuntimeRequestCount`。

您可以通过 AWS 管理控制台、或 CloudWatch API 获取 Amazon Lex 的指标。 AWS CLI您可以通过其中一个 Amazon AWS 软件开发套件 (SDKs) 或 CloudWatch API 工具来使用 API。 CloudWatch Amazon Lex 控制台根据来自 CloudWatch API 的原始数据显示图表。

您必须拥有相应的 CloudWatch 权限才能使用监控 Amazon Lex CloudWatch 。有关更多信息，请参阅《亚马逊* CloudWatch 用户指南》 CloudWatch*中的 [Amazon 身份验证和访问控制](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/auth-and-access-control-cw.html)。

## 查看 Amazon Lex 指标
<a name="aws-lex-cloudwatch-metrics"></a>

使用亚马逊 Lex 控制台或控制台查看 Amazon Lex 指标。 CloudWatch

**查看指标（Amazon Lex 控制台）**

1. 登录 AWS 管理控制台 并打开 Amazon Lex 控制台，网址为[https://console.aws.amazon.com/lex/](https://console.aws.amazon.com/lex/)。

1. 从自动程序列表中，选择要查看其指标的自动程序。

1. 选择**监控**。此时指标以图表形式显示。

**查看指标（CloudWatch 控制台）**

1. 登录 AWS 管理控制台 并打开 CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 依次选择**指标**、**所有指标**，然后选择 **AWS/Lex**。

1. 选择维度、指标名称，然后选择 **添加到图表**。

1. 选择日期范围的值。所选日期范围的指标计数将显示在该图表中。

## 创建警报
<a name="aws-lex-cloudwatch-alarms"></a>

 CloudWatch 警报在指定时间段内监视单个指标，并执行一项或多项操作：向亚马逊简单通知服务 (Amazon SNS) Simple Notification Service 主题或 Auto Scaling 策略发送通知。一个或多个操作基于指标在您指定的多个时间段内相对于给定阈值的值。 CloudWatch还可以在警报状态发生变化时向您发送 Amazon SNS 消息。

CloudWatch 警报仅在状态发生变化并且持续到您指定的时间段内时才会调用操作。

**设置警报**

1. 登录 AWS 管理控制台 并打开 CloudWatch 控制台，网址为[https://console.aws.amazon.com/cloudwatch/](https://console.aws.amazon.com/cloudwatch/)。

1. 依次选择 **Alarms** 和 **Create Alarm**。

1. 选择 **AWS/Lex 指标**，然后选择一个指标。

1. 对于 ** Time Range**，请选择要监控的时间范围，然后选择 **Next**。

1. 输入**名称**和**描述**。

1.  对于 **Whenever**，选择 **>=**，然后键入一个最大值。

1. 如果 CloudWatch 要在达到警报状态时发送电子邮件，请在 “**操作**” 部分的 “**每当此警报**” 中选择 “**状态为警报**”。对于**发送通知到**，选择一个邮件列表，或选择**新建列表**然后创建一个新的邮件列表。

1. 预览**警报预览**部分中的警报。如果对警报满意，请选择 **Create Alarm (创建警报)**。

## CloudWatch Amazon Lex 运行时的指标
<a name="cloudwatch-dimensions-for-aws-lex-runtime"></a>

下表介绍 Amazon Lex 运行时指标。


| 指标 | 说明 | 
| --- | --- | 
| KendraIndexAccessError | Amazon Lex 无法访问您的 Amazon Kendra 索引的次数。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| KendraLatency | Amazon Kendra 对来自 `AMAZON.KendraSearchIntent` 的请求做出响应所花费的时间。对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：毫秒 | 
| KendraSuccess | 从 `AMAZON.KendraSearchIntent` 到您的 Amazon Kendra 索引成功请求的数量。对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个 | 
| KendraSystemErrors | Amazon Lex 无法查询 Amazon Kendra 索引的次数。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| KendraThrottledEvents | Amazon Kendra 限制来自 `AMAZON.KendraSearchIntent` 的请求的次数。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| MissedUtteranceCount |  在指定时间段内未能识别的表达的数量。 对于 `Text ` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
|  `RuntimeConcurrency`  |  指定时间段内的并发连接数。`RuntimeConcurrency` 将被报告为 `StatisticSet`。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 其他操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| RuntimeInvalidLambdaResponses |  指定时间段内无效 AWS Lambda (Lambda) 响应的数量。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimeLambdaErrors | 指定时间段内的 Lambda 运行时错误数量。对于 `Text ` 或 `Speech` ` InputMode` 的 `PostContent` 操作的有效维度：[\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)`PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimePollyErrors |  在指定时段内的无效 Amazon Polly 响应的数量。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html)  | 
| RuntimeRequestCount |  指定时间段内的运行时请求数。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| RuntimeSucessfulRequestLatency  该指标是 `RuntimeSucessfulRequestLatency`，而不是 `RuntimeSuccessfulRequestLatency`。  |  从发送请求到传回响应这段时间内成功的请求的延迟。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：毫秒  | 
| RuntimeSystemErrors |  指定时间段内的系统错误的数量。系统错误的响应代码范围为 500 到 599。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| RuntimeThrottledEvents |  受限制请求的数目。当 Amazon Lex 接收的请求数超出为账户设置的每秒事务数限制时，它会限制请求。如果经常超出为账户设置的限制，您可以请求提高限制。要请求提高限制，请参阅 [AWS 服务限制](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 
| RuntimeUserErrors |  指定时间段内的用户错误的数量。用户错误的响应代码范围为 400 到 499。 对于 `Text` 或 `Speech` `InputMode` 的 `PostContent` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) `PostText` 操作的有效维度： [\[See the AWS documentation website for more details\]](http://docs.aws.amazon.com/zh_cn/lex/latest/dg/monitoring-aws-lex-cloudwatch.html) 单位：个  | 

Amazon Lex 运行时指标使用 `AWS/Lex` 命名空间并以下面的维度提供指标。您可以在 CloudWatch 控制台中按维度对指标进行分组：


| 维度 | 说明 | 
| --- | --- | 
| BotName, BotAlias, Operation, InputMode | 按自动程序的别名、自动程序的名称、操作 (PostContent) 以及输入是文本还是语音形式，对指标进行分组。 | 
| BotName, BotVersion, Operation, InputMode | 按自动程序的名称、自动程序的版本、操作 (PostContent) 以及输入是文本还是语音形式，对指标进行分组。 | 
| BotName, BotVersion, Operation | 按自动程序的名称、自动程序版本以及操作 PostText 对指标进行分组。 | 
| BotName, BotAlias, Operation | 按自动程序的名称、自动程序的别名以及操作 PostText 对指标进行分组。 | 

## CloudWatch Amazon Lex 渠道关联指标
<a name="cloudwatch-dimensions-for-aws-lex-channels"></a>

通道关联是 Amazon Lex 与消息收发通道（如 Facebook）之间的关联。下表介绍 Amazon Lex 通道关联指标。


| 指标 | 说明 | 
| --- | --- | 
| BotChannelAuthErrors | 指定时间内消息收发通道返回的身份验证错误的数量。身份验证错误表示在创建通道期间提供的秘密令牌无效或者已过期。  | 
| BotChannelConfigurationErrors | 指定时间段内的配置错误的数量。配置错误指示通道的一个或多个配置条目无效。  | 
| BotChannelInboundThrottledEvents | 在指定时间段内 Amazon Lex 限制消息收发通道发送消息的次数。  | 
| BotChannelOutboundThrottledEvents | 在指定时间段内从 Amazon Lex 到消息收发通道的出站事件被限制的次数。  | 
| BotChannelRequestCount | 指定时间段内对通道发出的请求的数量  | 
| BotChannelResponseCardErrors | 在指定时间段内 Amazon Lex 无法发布响应卡的次数。  | 
| BotChannelSystemErrors | 在指定时间段内对于一个通道在 Amazon Lex 中发生的内部错误的数量。  | 

Amazon Lex 通道关联指标使用 `AWS/Lex` 命名空间，并为以下维度提供指标。您可以在 CloudWatch 控制台中按维度对指标进行分组：


| 维度 | 说明 | 
| --- | --- | 
| BotAlias, BotChannelName, BotName, Source | 按自动程序的别名、通道名称、自动程序的名称以及流量来源对指标进行分组。 | 

## CloudWatch 对话日志的指标
<a name="cloudwatch-metrics-for-logging"></a>

Amazon Lex 为对话日志记录使用以下指标：


| 指标 | 说明 | 
| --- | --- | 
| ConversationLogsAudioDeliverySuccess | 在指定时间段内成功传输到 S3 存储桶的音频日志数量。 单位：计数 | 
| ConversationLogsAudioDeliveryFailure | 在指定时间段内未能传输到 S3 存储桶的音频日志数量。传输失败表示为对话日志配置的资源出现错误。错误可能包括 IAM 权限不足、 AWS KMS 密钥无法访问或 S3 存储桶无法访问。单位：计数 | 
| ConversationLogsTextDeliverySuccess | 在指定时间段内成功传送到 CloudWatch Logs 的文本日志的数量。 单位：计数 | 
| ConversationLogsTextDeliveryFailure | 在指定时间段内未能传送到 CloudWatch Logs 的文本日志的数量。传输失败表示为对话日志配置的资源出现错误。错误可能包括 IAM 权限不足、 AWS KMS 密钥无法访问或 CloudWatch 日志日志组无法访问。 单位：计数 | 

Amazon Lex 对话日志指标使用 `AWS/Lex` 命名空间并为以下维度提供指标。您可以在 CloudWatch 控制台中按维度对指标进行分组。


| 维度 | 说明 | 
| --- | --- | 
| `BotAlias` | 按自动程序的别名对指标进行分组。 | 
| `BotName` | 按自动程序的名称对指标进行分组。 | 
| `BotVersion` | 按自动程序的版本对指标进行分组。 | 

# 使用 AWS CloudTrail 日志监控 Amazon Lex API 调用
<a name="monitoring-aws-lex-cloudtrail"></a>

Amazon Lex 与 AWS CloudTrail一项服务集成，该服务提供用户、角色或 AWS 服务在 Amazon Lex 中采取的操作的记录。 CloudTrail 捕获一部分 Amazon Lex 的 API 调用作为事件，包括来自亚马逊 Lex 控制台的调用和对 Amazon Lex 的代码调用 APIs。如果您创建了跟踪，则可以允许将 CloudTrail 事件持续传输到 Amazon S3 存储桶，包括 Amazon Lex 的事件。如果您未配置跟踪，您仍然可以在 CloudTrail 控制台的 “事件**历史记录” 中查看最新的事件**。通过收集的信息 CloudTrail，您可以确定向 Amazon Lex 发出的请求、发出请求的 IP 地址、谁提出了请求、何时提出请求以及其他详细信息。

要了解更多信息 CloudTrail，包括如何配置和启用它，请参阅[AWS CloudTrail 用户指南](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

## Amazon Lex 中的信息 CloudTrail
<a name="service-name-info-in-cloudtrail"></a>

CloudTrail 在您创建 AWS 账户时已在您的账户上启用。当 Amazon Lex 中出现支持的事件活动时，该活动会与其他 AWS 服务 CloudTrail 事件一起记录在**事件历史**记录中。您可以在自己的 AWS 账户中查看、搜索和下载最近发生的事件。有关更多信息，请参阅[使用事件历史记录查看 CloudTrail 事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。

要持续记录您的 AWS 账户中的事件，包括 Amazon Lex 的事件，请创建跟踪。跟踪允许 CloudTrail 将日志文件传输到亚马逊简单存储服务 (Amazon S3) 存储桶。默认情况下，在控制台中创建跟踪记录时，此跟踪记录应用于所有 AWS 区域。跟踪记录 AWS 分区中所有区域的事件，并将日志文件传送到您指定的 S3 存储桶。此外，您可以配置其他 AWS 服务，以进一步分析和处理 CloudTrail 日志中收集的事件数据。有关更多信息，请参阅: 
+ [创建跟踪概述](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 支持的服务和集成](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [为 CloudTrail 配置 Amazon SNS 通知](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [接收来自多个区域的 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)和[接收来自多个账户的 CloudTrail 日志文件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

Amazon Lex 支持将以下操作作为事件记录在 CloudTrail 日志文件中：
+  [CreateBotVersion](API_CreateBotVersion.md)
+ [CreateIntentVersion](API_CreateIntentVersion.md) 
+ [CreateSlotTypeVersion](API_CreateSlotTypeVersion.md)
+ [DeleteBot](API_DeleteBot.md)
+ [DeleteBotAlias](API_DeleteBotAlias.md)
+ [DeleteBotChannelAssociation](API_DeleteBotChannelAssociation.md)
+ [DeleteBotVersion](API_DeleteBotVersion.md)
+ [DeleteIntent](API_DeleteIntent.md)
+ [DeleteIntentVersion](API_DeleteIntentVersion.md)
+ [DeleteSlotType](API_DeleteSlotType.md)
+ [DeleteSlotTypeVersion](API_DeleteSlotTypeVersion.md)
+ [DeleteUtterances](API_DeleteUtterances.md)
+ [GetBot](API_GetBot.md)
+ [GetBotAlias](API_GetBotAlias.md)
+ [GetBotAliases](API_GetBotAliases.md)
+ [GetBotChannelAssociation](API_GetBotChannelAssociation.md)
+ [GetBotChannelAssociations](API_GetBotChannelAssociations.md)
+ [GetBots](API_GetBots.md)
+ [GetBotVersions](API_GetBotVersions.md)
+ [GetBuiltinIntent](API_GetBuiltinIntent.md)
+ [GetBuiltinIntents](API_GetBuiltinIntents.md)
+ [GetBuiltinSlotTypes](API_GetBuiltinSlotTypes.md)
+ [GetSlotTypeVersions](API_GetSlotTypeVersions.md)
+ [GetUtterancesView](API_GetUtterancesView.md)
+ [PutBot](API_PutBot.md)
+  [PutBotAlias](API_PutBotAlias.md)
+ [PutIntent](API_PutIntent.md)
+  [PutSlotType](API_PutSlotType.md) 

每个事件或日志条目都包含有关生成请求的人员信息。此信息可帮助您确定以下内容：
+ 请求是使用根用户凭证还是 用户凭证发出的
+ 请求是使用角色还是联合用户的临时安全凭证发出的
+ 请求是否由其他 AWS 服务发出

有关更多信息，请参阅 [CloudTrail userIdentity 元素](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)。

有关 CloudTrail 日志中记录的 Amazon Lex 操作的信息，请参阅 [Amazon Lex 模型构建服务](https://docs.aws.amazon.com/lex/latest/dg/API_Operations_Amazon_Lex_Model_Building_Service.html)。例如，对[PutBot](API_PutBot.md)[GetBot](API_GetBot.md)、和[DeleteBot](API_DeleteBot.md)操作的调用会在 CloudTrail 日志中生成条目。在 [ Amazon Lex Runtime Service ](https://docs.aws.amazon.com/lex/latest/dg/API_Operations_Amazon_Lex_Runtime_Service.html)、[PostContent](API_runtime_PostContent.md) 和 [PostText](API_runtime_PostText.md) 中记录的操作记录不会写入日志。

## 示例：Amazon Lex 日志文件条目
<a name="understanding-aws-lex-entries"></a>

跟踪是一种配置，允许将事件作为日志文件传输到您指定的 S3 存储桶。 CloudTrail 日志文件包含一个或多个日志条目。事件代表来自任何来源的单个请求，包括有关请求的操作、操作的日期和时间、请求参数等的信息。 CloudTrail 日志文件不是公共 API 调用的有序堆栈跟踪，因此它们不会按任何特定顺序出现。

以下示例 CloudTrail 日志条目显示了调用`PutBot`操作的结果。