创建端点 - 亚马逊 SageMaker AI
Amazon Web Services 文档中描述的 Amazon Web Services 服务或功能可能因区域而异。要查看适用于中国区域的差异,请参阅 中国的 Amazon Web Services 服务入门 (PDF)

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

创建端点

完成模型和端点配置后,可使用 CreateEndpoint API 创建端点。终端节点名称在您 Amazon 账户的某个 Amazon 区域内必须是唯一的。

下文将使用在请求中指定的端点配置创建端点。Amazon SageMaker AI 使用终端节点来配置资源和部署模型。

# The name of the endpoint.The name must be unique within an AWS Region in your AWS account. endpoint_name = '<endpoint-name>' # The name of the endpoint configuration associated with this endpoint. endpoint_config_name='<endpoint-config-name>' create_endpoint_response = sagemaker_client.create_endpoint( EndpointName=endpoint_name, EndpointConfigName=endpoint_config_name)

当您调用 CreateEndpoint API 时,Amazon SageMaker 异步推理会发送测试通知,以检查您是否已配置了 Amazon SNS 主题。Amazon SageMaker 异步推理还会在调用UpdateEndpointUpdateEndpointWeightsAndCapacities后发送测试通知。这让 SageMaker AI 可以检查你是否拥有所需的权限。通知可以直接忽略。测试通知格式如下:

{ "eventVersion":"1.0", "eventSource":"aws:sagemaker", "eventName":"TestNotification" }