

**终止支持通知：** AWS 将于 2026 年 10 月 30 日终止对亚马逊 Pinpoint 的支持。2026 年 10 月 30 日之后，您将不再能够访问 Amazon Pinpoint 控制台或 Amazon Pinpoint 资源（端点、分段、活动、旅程和分析）。有关更多信息，请参阅 [Amazon Pinpoint 终止支持](https://docs.aws.amazon.com/console/pinpoint/migration-guide)。**注意：** APIs 与短信相关、语音、移动推送、OTP 和电话号码验证不受此更改的影响，并受 AWS 最终用户消息的支持。

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

# 问题排查
<a name="troubleshooting"></a>

**注意**  
已移动以下问题排查主题：  
[对客户细分进行故障排除](segments-troubleshooting.md)
[活动故障排除](campaigns-troubleshooting.md)
[旅程故障排除](journeys-troubleshooting.md)
[短信渠道故障排除](channels-sms-troubleshooting.md)
[语音渠道故障排除](channels-voice-troubleshooting.md)
[推送渠道故障排除](channels-push-troubleshooting.md)
[电子邮件渠道故障排除](channels-email-troubleshooting.md)

 请熟悉问题排查信息和可能的解决方案，这将有助于您解决在使用 Amazon Pinpoint 时遇到的问题。<a name="troubleshooting-logging"></a>

**监控和日志记录**

作为最佳实践，请考虑通过以下方式在 Amazon Pinpoint 中记录事件：
+ 按照中的说明打开事件流 Amazon Kinesis Data Streams [使用 Amazon Pinpoint 流式传输事件](analytics-streaming.md)。
+ 使用自定义日志记录解决方案。有关更多信息，请参阅[数字用户互动事件数据库](https://aws.amazon.com/solutions/implementations/digital-user-engagement-events-database/)。涉及多种服务，并且会产生额外费用。
+ 使用亚马逊 Pinpoint 支持的 Amazon CloudWatch 指标。有关更多信息，请参阅 [使用 Amazon CloudWatch 监控 Amazon Pinpoint](monitoring.md)。
+ 使用 Amazon Pinpoint API 调用已登录。 CloudTrail有关更多信息，请参阅《Amazon Pinpoint 开发者指南》**中的[使用 AWS CloudTrail记录 Amazon Pinpoint API 调用](https://docs.aws.amazon.com/pinpoint/latest/developerguide/logging-using-cloudtrail.html)。

**Topics**
+ [常见任务的 CLI 示例](#troubleshooting-cli-examples)

## 常见任务的 CLI 示例
<a name="troubleshooting-cli-examples"></a>

以下示例是 Amazon Pinpoint 的常用 CLI 命令。
+ 获取端点数据：[get-endpoint](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/get-endpoint.html) CLI

  ```
  aws pinpoint get-endpoint —application-id {{AppId}} —endpoint-id {{EndpointId}}
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{EndpointId}}替换为您正在检索的现有端点的 ID。
+ 获取用户数据：[get-user-endpoints](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/get-user-endpoints.html)CLI

  ```
  aws pinpoint get-user-endpoints —application-id {{AppId}} —user-id {{UserId}}
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{UserId}}替换为用户的 ID。
+ 更新或创建新端点：[update-endpoint](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/update-endpoint.html) CLI

  ```
  aws pinpoint update-endpoint —application-id {{AppId}} —endpoint-id {{EndpointId}} —endpoint-request '{"ChannelType":"SMS","Address":"+12345678","Location":{"Country":"USA"},"User":{"UserId":"{{UserId}}"}}'
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{EndpointId}}替换为您正在创建或更新的现有终端节点的 ID。
  + {{UserId}}替换为用户的 ID。
+ 删除端点：[delete-endpoint](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/delete-endpoint.html) CLI

  ```
  aws pinpoint delete-endpoint —application-id {{AppId}} —endpoint-id {{EndpointId}} 
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{EndpointId}}替换为您要删除的现有终端节点的 ID。
+ 验证电话号码：[phone-number-validate](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/phone-number-validate.html)CLI

  ```
  aws pinpoint phone-number-validate —number-validate-request PhoneNumber={{+12065550100}}
  ```

**在前面的命令中，进行以下更改：**
  + {{\+12065550100}}替换为您要验证的电话号码。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 示例 CLI：短信发往号码

  ```
  aws pinpoint send-messages --application-id {{AppID}} --message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test message"}},"Addresses": {"{{DestinationPhoneNumber}}": {"ChannelType":"SMS"}}}‘
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{DestinationPhoneNumber}}替换为您要发送的电话号码。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 示例 CLI：发起号码发出短信

  ```
  aws pinpoint send-messages --application-id {{AppID}} --message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"hello, how are you?","OriginationNumber": "{{OriginPhoneNumber}}"}},"Addresses": {"{{DestinationPhoneNumber}}": {"ChannelType":"SMS"}}}‘
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{OriginPhoneNumber}}替换为您想要发送消息的电话号码。
  + {{DestinationPhoneNumber}}替换为您要发送的电话号码。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 示例 CLI：短信发往端点

  ```
  aws pinpoint send-messages —application-id {{AppID}}  —message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test message"}},"Endpoints": {"{{EndPointId}}": {}}}'
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{EndPointId}}替换为您要发送的现有终端节点的 ID。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 示例 CLI：短信发往 userId

  ```
  aws pinpoint send-users-messages —application-id {{AppID}} —send-users-message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test"}},"Users": {"{{UserId}}": {}}}'
  ```

**在前面的命令中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{UserId}}替换为用户的 ID。
+ 通过 [Amazon Pinpoint 消息模板](messages-templates.md) [create-campaign](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/create-campaign.html) CLI 创建活动

  ```
  aws pinpoint create-campaign —application-id {{AppId}} —write-campaign-request file://campaignclirequest.json 
  
  file://campaignclirequest.json 
  {
  	"Description": "CLITestCampaign",
  	"HoldoutPercent": 0,
  	"MessageConfiguration": 
  	{
  		"DefaultMessage": 
  		{
  			"Body": "TestFromCLI"
  		}
  	},
  	"Name": "TestingCLICampaign",
  	"Schedule": 
  	{
  		"StartTime": "IMMEDIATE"
  	},
  	"TemplateConfiguration": 
  		{
  		"EmailTemplate": 
  			{
  			"Name": "{{TemplateName}}",
  			"Version": "{{Version}}"
  			}
  		},
  	"SegmentId": "{{SegmentID}}",
  	"SegmentVersion": 1
  }
  ```

**在前面的命令和文件中，进行以下更改：**
  + {{AppId}}替换为包含终端节点的 Amazon Pinpoint 项目的编号。
  + {{TemplateName}}替换为模板的名称。
  + {{Version}}替换为模板的版本。
  + {{SegmentID}}替换为要定位的区段的 ID。