

**支援結束通知：**2026 年 10 月 30 日， AWS 將結束對 Amazon Pinpoint 的支援。2026 年 10 月 30 日之後，您將無法再存取 Amazon Pinpoint 主控台或 Amazon Pinpoint 資源 (端點、區段、行銷活動、旅程和分析)。如需詳細資訊，請參閱 [Amazon Pinpoint 終止支援](https://docs.aws.amazon.com/console/pinpoint/migration-guide)。**注意：**與 SMS、語音、行動推播、OTP 和電話號碼驗證相關的 APIs 不受此變更影響，並受 AWS 最終使用者傳訊支援。

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 疑難排解
<a name="troubleshooting"></a>

**注意**  
已移動下列疑難排解主題：  
[區段故障診斷](segments-troubleshooting.md)
[疑難排解行銷活動](campaigns-troubleshooting.md)
[對旅程進行故障診斷](journeys-troubleshooting.md)
[對 SMS 管道進行故障診斷](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/)。涉及多項服務，並產生額外費用。
+ 使用 Amazon Pinpoint 支援的 Amazon CloudWatch 指標。如需詳細資訊，請參閱[使用 Amazon CloudWatch 監控 Amazon Pinpoint](monitoring.md)。
+ 使用記錄在 CloudTrail 中的 Amazon Pinpoint API 呼叫。詳情請參閱*《Amazon Pinpoint 開發人員指南》*中的[記錄 Amazon Pinpoint API 呼叫 AWS CloudTrail](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 專案的 ID。
  + 將 {{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 專案的 ID。
  + 將 {{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 專案的 ID。
  + 將 {{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 專案的 ID。
  + 將 {{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：SMS 到號碼

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

**在上述命令中，進行下列變更：**
  + 將 {{AppId}} 替換成包含該端點的 Amazon Pinpoint 專案的 ID。
  + 將 {{DestinationPhoneNumber}} 替換成目的地的電話號碼。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 範例 CLI：起始號碼到 SMS

  ```
  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 專案的 ID。
  + 將 {{OriginPhoneNumber}} 替換成您要傳送訊息的來源電話號碼。
  + 將 {{DestinationPhoneNumber}} 替換成目的地的電話號碼。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 範例 CLI：SMS 到端點

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

**在上述命令中，進行下列變更：**
  + 將 {{AppId}} 替換成包含該端點的 Amazon Pinpoint 專案的 ID。
  + 將 {{EndPointId}} 替換成目的地的現有端點的 ID。
+ [send-messages](https://docs.aws.amazon.com/cli/latest/reference/pinpoint/send-messages.html) 範例 CLI：SMS 到 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 專案的 ID。
  + 將 {{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 專案的 ID。
  + 將 {{TemplateName}} 替換成範本的名稱。
  + 將{{版本}}替換成範本的版本。
  + 將 {{SegmentID}} 替換成要鎖定的客群的 ID。