终止支持通知: AWS 将于 2026 年 10 月 30 日终止对亚马逊 Pinpoint 的支持。2026 年 10 月 30 日之后,您将无法再访问亚马逊 Pinpoint 控制台或亚马逊 Pinpoint 资源(终端节点、区段、活动、旅程和分析)。有关更多信息,请参阅 Amazon Pinpoint 终止支持。注意: APIs 与短信相关、语音、移动推送、OTP 和电话号码验证不受此更改的影响,并受 AWS 最终用户消息的支持。
本文属于机器翻译版本。若本译文内容与英语原文存在差异,则一律以英文原文为准。
亚马逊 Pinpoint 终止支持
经过深思熟虑,我们决定终止对亚马逊 Pinpoint 的支持,自 2026 年 10 月 30 日起生效。从 2025 年 5 月 20 日起,亚马逊 Pinpoint 将不再接受新客户。作为账户在 2025 年 5 月 20 日之前注册该服务的现有客户,您可以继续使用 Amazon Pinpoint 功能。2026 年 10 月 30 日之后,您将无法再使用亚马逊 Pinpoint。
如今,客户将 Amazon Pinpoint 用于其参与功能(终端节点、细分市场、营销活动、旅程和分析),要么用于其消息渠道 APIs (短信、彩信 WhatsApp、推送和文字转语音消息功能)。我们已经为这两组客户制定了离职计划。
这对你意味着什么
如果您使用的是 Amazon Pinpoint 参与功能(终端节点、细分、活动、旅程和分析),我们建议您迁移到 Amazon Connect 主动参与解决方案(例如 Amazon Connect 出站活动
Amazon Pinpoint 通信渠道(短信、彩信 WhatsApp、推送和文字转语音消息功能)于 2024 年第三季度更名为AWS 最终用户消息,并将继续满足开发者向客户传送消息
迁移步骤:亚马逊 Pinpoint 参与的过渡功能
寻求互动功能的客户
要使用 Amazon Connect 的主动参与功能,包括区段、消息模板、活动、旅程、分析,请按照本指南将 Amazon Pinpoint 参与功能迁移到 Amazon Connect。
迁移终端节点和分段
亚马逊 Pinpoint 终端节点可以建模为 Amazon Connect 客户档案。Customer Profiles 允许您将多个端点组合成一个配置文件,允许将最多 3 个电子邮件地址和 4 个电话号码建模为单个配置文件。要迁移您的终端节点,您可以
-
创建不带筛选条件的 Amazon Pinpoint 区段,有效地涵盖您的所有终端节点。
-
将该分段导出到 S3 存储桶或本地计算机。
-
将转换后的端点上传到客户档案,然后使用客户档案的 S3 连接器在客户档案中创建数据集成。
如果您想将终端节点聚合到单个客户资料下,则可以解析下载的 Amazon Pinpoint 区段,在单个个人资料下收集电子邮件地址和电话号码。 这是一个 Python 脚本示例,用于读取 JSON 格式的导出文件并创建可以导入到客户资料中的配置文件。
from collections import defaultdict import json def process_pinpoint_endpoints(input_file, output_file): # Dictionary to store grouped endpoints by user ID grouped_endpoints = defaultdict(list) endpoints = [] # Read the input file with open(input_file, 'r') as file: for line in file: endpoints.append(json.loads(line)) # Group endpoints by user ID for endpoint in endpoints: user_id = endpoint.get('User', {}).get('UserId') if user_id: grouped_endpoints[user_id].append(endpoint) # Convert grouped endpoints to Customer Profiles format # We will assume the userId is stored as an AccountNumber # since the AccountNumber can be queried customer_profiles = [] for user_id, user_endpoints in grouped_endpoints.items(): profile = { 'AccountNumber': user_id, 'Attributes': {}, 'Address': {} } phone_numbers = set() email_addresses = set() output_dict = {} for endpoint in user_endpoints: # Extract attributes attributes = endpoint.get('Attributes', {}) for key, value_list in attributes.items(): if len(value_list) == 1: output_dict[key] = value_list[0] else: for i, item in enumerate(value_list): output_dict[f"{key}_{i}"] = item demographics = endpoint.get('Demographic') for key, value in demographics.items(): attributes[f"Demographic_{key}"] = value location = endpoint.get('Location', {}) profile['Address']['City'] = location['City'] profile['Address']['Country'] = location['Country'] profile['Address']['PostalCode'] = location['PostalCode'] profile['Address']['County'] = location['Region'] profile['Attributes']['Latitude'] = location['Latitude'] profile['Attributes']['Longitude'] = location['Longitude'] metrics = endpoint.get('Metrics', {}) for key, value in metrics.items(): profile['Attributes'][f"Metrics_{key}"] = str(value) user = endpoint.get('User', {}) user_attributes = user.get('UserAttributes', {}) for key, value_list in user_attributes.items(): if len(value_list) == 1: output_dict[key] = value_list[0] else: for i, item in enumerate(value_list): output_dict[f"UserAttributes.{key}_{i}"] = item profile['Attributes'].update(output_dict) # Extract phone number address = endpoint.get('Address') if (endpoint.get('ChannelType') == 'SMS' or endpoint.get('ChannelType') == 'VOICE') and address: phone_numbers.add(address) # Extract email address if endpoint.get('ChannelType') == 'EMAIL' and address: email_addresses.add(address) # Assigning the phone numbers to the different parameters in the Customer Profile for i, phone_number in enumerate(phone_numbers): if i == 0: profile['PhoneNumber'] = phone_number elif i == 1: profile['HomePhoneNumber'] = phone_number elif i == 2: profile['MobilePhoneNumber'] = phone_number elif i == 3: profile['BusinessPhoneNumber'] = phone_number else: profile['Attributes'][f"PhoneNumber_{i}"] = phone_number # Assigning the email addresses to the different parameters in the Customer Profile for i, email_address in enumerate(email_addresses): if i == 0: profile['EmailAddress'] = email_address elif i == 1: profile['PersonalEmailAddress'] = email_address elif i == 2: profile['BusinessEmailAddress'] = email_address else: profile['Attributes'][f"EmailAddress_{i}"] = email_address customer_profiles.append(profile) # Write the output to a file with open(output_file, 'w') as f: json.dump(customer_profiles, f, indent=2) print(f"Processed {len(endpoints)} endpoints into {len(customer_profiles)} customer profiles.") # Example usage input_file = 'pinpoint_endpoints.json' output_file = 'customer_profiles.json' process_pinpoint_endpoints(input_file, output_file)
迁移频道配置
按照入门步骤在 Amazon Connect 中启用短信和电子邮件通信。
迁移模板
Amazon Connect 中的模板使用与 Amazon Pinpoint 相同的消息呈现引擎(Handlebars)。但是,属性占位符的表示方式有所不同。
-
您可以使用我们现有的亚马逊 Pinpoint APIs 来获取模板(例如 get-email-template,get-sms-template)。或者,您可以按照本指南编辑模板,以便复制其内容。
-
获取模板后,更新其占位符。例如,您之前的 Amazon Pinpoint 模板使用了类似的占位符。
{{User.UserAttributes.PurchaseHistory}}
现在可以将其更改为{{Attributes.Customer.Attributes.PurchaseHistory}}
。 -
接下来,使用 create-message-templateAPI 在 Amazon Connect 的 Q 中创建模板或使用本指南创建消息模板。
要映射您的属性,请按照之前将端点映射到配置文件时所做的映射(前缀为)。Attributes.Customer
迁移广告活动
对于每个广告活动,我们建议您使用 get-campaign API 来获取其定义,然后使用广告活动创建指南在 Amazon Connect 中重新创建该定义。
迁移旅程
Amazon Connect 尚未完全支持旅程。如果可以使用 Amazon Connect 广告系列解决您的旅程用例,我们建议您评估这些用例。如果是,请按照与上述类似的方法使用 get-journey API 获取其定义,然后使用广告活动创建指南在 Amazon Connect 中重新创建该定义。
活动收集和移动分析客户
Amplify SDK 客户
如果您使用 Amplify SDK 向亚马逊 Pinpoint 发送事件以更新终端节点、触发活动或旅程或分析应用程序的使用情况,则可以迁移到使用 Kinesis。使用 Kinesis,您可以将事件流式传输到您选择的计算平台,让他们向客户资料发送更新,从而更新应用程序用户的个人资料并触发 Amazon Connect 活动。
Put-Events 客户
如果您仅使用 Amazon Pinpoint 将事件从您的网络/移动应用程序流式传输到 Kinesis 直播,那么您现在可以使用 Amplify SDK 将事件直接流式传输到 Kinesis。
不可用的功能
截至目前,以下亚马逊 Pinpoint 参与功能在 Amazon Connect 中尚不可用。
-
应用程序内消息
-
在广告活动中推送(GCM、APNS、百度等)通知
-
自定义频道
-
导入的区段
-
旅程
离职步骤:将数据导出到第三方
如果您想删除所有 Amazon Pinpoint 数据,请随时使用删除应用程序 API 删除应用程序。之后,请使用本指南删除所有未使用的消息模板,以删除模板。
或者,如果您想提取所有资源并将其存储,请按照以下步骤操作。
了解如何查看、监控和管理 SageMaker 端点。
要移除终端节点,您可以
-
创建不带筛选条件的 Amazon Pinpoint 区段,有效地涵盖您的所有终端节点。
-
将该分段导出到 S3 存储桶或本地计算机。
细分、营销活动和旅程
要移除您的细分、广告系列和旅程,请使用我们 APIs 或我们的用户界面进行检索。为此,您可以使用我们的 get-segment、get-campaign 或get-journe y。 APIs
消息模板
要移除您的模板,您可以使用列表模板 API,然后使用特定于频道的API- APIs
亚马逊 Pinpoint 和移动分析
要将您的活动 KPIs 从亚马逊 Pinpoint Analytics 或 Mobile Analytics 中移除,您可以使用以下选项:
-
要在迁移之前导出 future 原始事件,客户可以加入事件数据流。
-
客户可以使用以下命令导 KPIs 出过去 3 个月的:
对于需要在迁移过程中删除 Mobile Analytics 应用程序的客户,您可以使用以下 Python 脚本。此脚本使用 AWS 签名版本 4 通过 Mobile Analytics API 进行身份验证。
-
将以下脚本另存为
delete_mobile_analytics_application.py
。# Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # This file is licensed under the Apache License, Version 2.0 (the "License"). # You may not use this file except in compliance with the License. A copy of the # License is located at # # http://aws.amazon.com/apache2.0/ # # This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS # OF ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. # # ABOUT THIS PYTHON SAMPLE: This sample is part of the AWS General Reference # Signing AWS API Requests top available at # https://docs.aws.amazon.com/general/latest/gr/sigv4-signed-request-examples.html # # AWS Version 4 signing example # Delete Mobile Analytics application # See: http://docs.aws.amazon.com/general/latest/gr/sigv4_signing.html # This version makes a DELETE request and passes the signature # in the Authorization header. import sys, os, base64, datetime, hashlib, hmac import requests # pip install requests import argparse # Parse command line arguments parser = argparse.ArgumentParser(description='Delete a Mobile Analytics application') parser.add_argument('--appId', type=str, help='Mobile Analytics application ID to be deleted', required=True) args = parser.parse_args() # ************* REQUEST VALUES ************* delimiter = "/" method = 'DELETE' service = 'mobileanalytics' host = 'mobileanalytics.us-east-1.amazonaws.com' region = 'us-east-1' appId = args.appId # Use the appId from command line arguments endpoint = 'https://mobileanalytics.us-east-1.amazonaws.com/2016-07-01/apps' + delimiter + appId request_parameters = '' # Function for signing. Refer the AWS documentation below for more details. # http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python def sign(key, msg): return hmac.new(key, msg.encode('utf-8'), hashlib.sha256).digest() # Function for computing signature key. Refer the AWS documentation below for more details. # http://docs.aws.amazon.com/general/latest/gr/signature-v4-examples.html#signature-v4-examples-python. def getSignatureKey(key, dateStamp, regionName, serviceName): kDate = sign(('AWS4' + key).encode('utf-8'), dateStamp) kRegion = sign(kDate, regionName) kService = sign(kRegion, serviceName) kSigning = sign(kService, 'aws4_request') return kSigning # Read AWS access key from environment variables or configuration file. Best practice is NOT # to embed credentials in code. access_key = os.environ.get('AWS_ACCESS_KEY_ID') secret_key = os.environ.get('AWS_SECRET_ACCESS_KEY') session_token = os.environ.get('AWS_SESSION_TOKEN') if access_key is None or secret_key is None: print('No access key is available.') sys.exit() # Create a date for headers and the credential string t = datetime.datetime.now(datetime.UTC) amzdate = t.strftime('%Y%m%dT%H%M%SZ') datestamp = t.strftime('%Y%m%d') # Date w/o time, used in credential scope # ************* TASK 1: CREATE A CANONICAL REQUEST ************* # http://docs.aws.amazon.com/general/latest/gr/sigv4-create-canonical-request.html # Step 1 is to define the verb (GET, POST, etc.)--already done with defining "method" variable above. # Step 2: Create canonical URI--the part of the URI from domain to query # string (use '/' if no path) canonical_uri = '/2016-07-01/apps' + delimiter + appId # Step 3: Create the canonical query string. In this example (a DELETE request), # request parameters are in the query string. Query string values must # be URL-encoded (space=%20). The parameters must be sorted by name. # For this example, the query string is pre-formatted in the request_parameters variable. canonical_querystring = request_parameters # Step 4: Create the canonical headers and signed headers. Header names # must be trimmed and lowercase, and sorted in code point order from # low to high. Note that there is a trailing \n. canonical_headers = 'host:' + host + '\n' + 'x-amz-date:' + amzdate + '\n' # Step 5: Create the list of signed headers. This lists the headers # in the canonical_headers list, delimited with ";" and in alpha order. # Note: The request can include any headers; canonical_headers and # signed_headers lists those that you want to be included in the # hash of the request. "Host" and "x-amz-date" are always required. signed_headers = 'host;x-amz-date' # Step 6: Create payload hash (hash of the request body content). For GET # requests, the payload is an empty string (""). payload_hash = hashlib.sha256(request_parameters.encode('utf-8')).hexdigest() # Step 7: Combine elements to create canonical request canonical_request = method + '\n' + canonical_uri + '\n' + canonical_querystring + '\n' + canonical_headers + '\n' + signed_headers + '\n' + payload_hash # ************* TASK 2: CREATE THE STRING TO SIGN************* # Match the algorithm to the hashing algorithm you use, either SHA-1 or # SHA-256 (recommended) algorithm = 'AWS4-HMAC-SHA256' credential_scope = datestamp + '/' + region + '/' + service + '/' + 'aws4_request' string_to_sign = algorithm + '\n' + amzdate + '\n' + credential_scope + '\n' + hashlib.sha256( canonical_request.encode('utf-8')).hexdigest() # ************* TASK 3: CALCULATE THE SIGNATURE ************* # Create the signing key using the function defined above. signing_key = getSignatureKey(secret_key, datestamp, region, service) # Compute signature by invoking hmac.new method by passing signingkey, string_to_sign signature = hmac.new(signing_key, string_to_sign.encode('utf-8'), hashlib.sha256).hexdigest() # ************* TASK 4: ADD SIGNING INFORMATION TO THE REQUEST ************* # The signing information can be either in a query string value or in # a header named Authorization. This code shows how to use a header. # Create authorization header and add to request headers authorization_header = algorithm + ' ' + 'Credential=' + access_key + '/' + credential_scope + ', ' + 'SignedHeaders=' + signed_headers + ', ' + 'Signature=' + signature # The request can include any headers, but MUST include "host", "x-amz-date", # and (for this scenario) "Authorization". "host" and "x-amz-date" must # be included in the canonical_headers and signed_headers, as noted # earlier. Order here is not significant. # Python note: The 'host' header is added automatically by the Python 'requests' library. headers = { 'x-amz-date': amzdate, 'accept': 'application/hal+json', 'content-type': 'application/json; charset=UTF-8', 'Authorization': authorization_header} if session_token: headers['X-Amz-Security-Token'] = session_token # ************* SEND THE REQUEST ************* request_url = endpoint + '?' + canonical_querystring print('\nBEGIN REQUEST++++++++++++++++++++++++++++++++++++') print('Request URL = ' + request_url) print('Request Headers = ', headers) r = requests.delete(request_url, data=request_parameters, headers=headers) print('\nRESPONSE++++++++++++++++++++++++++++++++++++') print('Response code: %d\n' % r.status_code) print(r.text)
-
确保将有效的 AWS 凭据设置为环境变量。
-
使用您的 Mobile Analytics 应用程序 ID 运行脚本:
python delete_mobile_analytics_application.py --appId
<YOUR_MOBILE_ANALYTICS_APP_ID>
此脚本向 Mobile Analytics API 发出移除指定应用程序的DELETE
请求。请务必为需要删除的每个 Mobile Analytics 应用程序运行此程序。
注意
在亚马逊 Pinpoint 终止支持日期之前,活跃的 Mobile Analytics 客户可以继续通过 putEvents
API 获取事件并在亚马逊 Pinpoint 中查看事件。
摘要
拥有至少一个亚马逊 Pinpoint 账户的组织可以继续使用 Amazon Pinpoint 参与功能,包括细分、活动、旅程、分析和电子邮件,直到 2026 年 10 月 30 日该服务的支持将终止。
其他资源
以下是可用的其他资源:
如果您需要帮助或有反馈,请联系AWS 支持