终止支持通知:AWS 将于 2026 年 10 月 30 日终止对 Amazon Pinpoint 的支持。2026 年 10 月 30 日之后,您将不再能够访问 Amazon Pinpoint 控制台或 Amazon Pinpoint 资源(端点、客户细分、营销活动、旅程和分析)。有关更多信息,请参阅 Amazon Pinpoint 终止支持。注意:与短信、语音、移动推送、OTP 和电话号码验证相关的 API 不受此变更的影响,AWS End User Messaging 支持这些功能。
故障排除
注意
请熟悉问题排查信息和可能的解决方案,这将有助于您解决在使用 Amazon Pinpoint 时遇到的问题。
监控和日志记录
作为最佳实践,请考虑通过以下方式在 Amazon Pinpoint 中记录事件:
-
按照使用 Amazon Pinpoint 流式传输事件中的说明,通过 Amazon Kinesis Data Streams 开启事件流。
-
使用自定义日志记录解决方案。有关更多信息,请参阅数字用户互动事件数据库
。涉及多种服务,并且会产生额外费用。 -
使用 Amazon Pinpoint 支持的 Amazon CloudWatch 指标。有关更多信息,请参阅 使用 Amazon CloudWatch 监控 Amazon Pinpoint。
-
使用 CloudTrail 中记录的 Amazon Pinpoint API 调用。有关更多信息,请参阅《Amazon Pinpoint 开发者指南》中的使用 AWS CloudTrail 记录 Amazon Pinpoint API 调用。
常见任务的 CLI 示例
以下示例是 Amazon Pinpoint 的常用 CLI 命令。
-
获取端点数据:get-endpoint CLI
aws pinpoint get-endpoint —application-idAppId—endpoint-idEndpointId在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
EndpointId替换为您正在检索的现有端点的 ID。
-
-
获取用户数据:get-user-endpoints CLI
aws pinpoint get-user-endpoints —application-idAppId—user-idUserId在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
UserId替换为用户的 ID。
-
-
更新或创建新端点:update-endpoint CLI
aws pinpoint update-endpoint —application-idAppId—endpoint-idEndpointId—endpoint-request '{"ChannelType":"SMS","Address":"+12345678","Location":{"Country":"USA"},"User":{"UserId":"UserId"}}'在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
EndpointId替换为您正在创建或更新的现有端点的 ID。 -
将
UserId替换为用户的 ID。
-
-
删除端点:delete-endpoint CLI
aws pinpoint delete-endpoint —application-idAppId—endpoint-idEndpointId在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
EndpointId替换为您要删除的现有端点的 ID。
-
-
验证电话号码:phone-number-validate CLI
aws pinpoint phone-number-validate —number-validate-request PhoneNumber=+12065550100在前面的命令中,进行以下更改:
-
将
+12065550100替换为要验证的电话号码。
-
-
send-messages 示例 CLI:短信发往号码
aws pinpoint send-messages --application-idAppID--message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test message"}},"Addresses": {"DestinationPhoneNumber": {"ChannelType":"SMS"}}}‘在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
DestinationPhoneNumber替换为您想要将消息发往的电话号码。
-
-
send-messages 示例 CLI:发起号码发出短信
aws pinpoint send-messages --application-idAppID--message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"hello, how are you?","OriginationNumber": "OriginPhoneNumber"}},"Addresses": {"DestinationPhoneNumber": {"ChannelType":"SMS"}}}‘在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
OriginPhoneNumber替换为您要从中发出消息的电话号码。 -
将
DestinationPhoneNumber替换为您想要将消息发往的电话号码。
-
-
send-messages 示例 CLI:短信发往端点
aws pinpoint send-messages —application-idAppID—message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test message"}},"Endpoints": {"EndPointId": {}}}'在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
EndpointId替换为您要将消息发往的现有端点的 ID。
-
-
send-messages 示例 CLI:短信发往 userId
aws pinpoint send-users-messages —application-idAppID—send-users-message-request '{"MessageConfiguration": {"SMSMessage":{"Body":"This is a test"}},"Users": {"UserId": {}}}'在前面的命令中,进行以下更改:
-
将
AppId替换为包含该端点的 Amazon Pinpoint 项目的 ID。 -
将
UserId替换为用户的 ID。
-
-
通过 Amazon Pinpoint 消息模板 create-campaign CLI 创建活动
aws pinpoint create-campaign —application-idAppId—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替换为模板的名称。 -
将
Version替换为模板的版本。 -
将
SegmentID替换为目标客户细分的 ID。
-