endpoints
Creates, updates, deletes, gets or lists an endpoints resource.
Overview
| Name | endpoints |
| Type | Resource |
| Id | aws.sagemaker.endpoints |
Fields
The following fields are returned by SELECT queries:
- describe_endpoint
- list_endpoints
| Name | Datatype | Description |
|---|---|---|
async_inference_config | object | Returns the description of an endpoint configuration created using the CreateEndpointConfig API. |
creation_time | string (date-time) | A timestamp that shows when the endpoint was created. |
data_capture_config | object | The currently active data capture configuration used by your Endpoint. |
endpoint_arn | string | The Amazon Resource Name (ARN) of the endpoint. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:endpoint/.*</code>) |
endpoint_config_name | string | The name of the endpoint configuration associated with this endpoint. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
endpoint_name | string | Name of the endpoint. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
endpoint_status | string | The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use the FailureReason value returned by DescribeEndpoint for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. UpdateRollbackFailed: Both the rolling deployment and auto-rollback failed. Your endpoint is in service with a mix of the old and new endpoint configurations. For information about how to remedy this issue and restore the endpoint's status to InService, see Rolling Deployments. (OutOfService, Creating, Updating, SystemUpdating, RollingBack, InService, Deleting, Failed, UpdateRollbackFailed) |
explainer_config | object | The configuration parameters for an explainer. |
failure_reason | string | If the status of the endpoint is Failed, the reason why it failed. |
last_deployment_config | object | The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations. |
last_modified_time | string (date-time) | A timestamp that shows when the endpoint was last modified. |
metrics_config | object | The configuration parameters for utilization metrics. |
pending_deployment_summary | object | Returns the summary of an in-progress deployment. This field is only returned when the endpoint is creating or updating with a new endpoint configuration. |
production_variants | array | An array of ProductionVariantSummary objects, one for each model hosted behind this endpoint. |
shadow_production_variants | array | An array of ProductionVariantSummary objects, one for each model that you want to host at this endpoint in shadow mode with production traffic replicated from the model specified on ProductionVariants. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | A timestamp that shows when the endpoint was created. |
endpoint_arn | string | The Amazon Resource Name (ARN) of the endpoint. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:endpoint/.*</code>) |
endpoint_name | string | The name of the endpoint. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
endpoint_status | string | The status of the endpoint. OutOfService: Endpoint is not available to take incoming requests. Creating: CreateEndpoint is executing. Updating: UpdateEndpoint or UpdateEndpointWeightsAndCapacities is executing. SystemUpdating: Endpoint is undergoing maintenance and cannot be updated or deleted or re-scaled until it has completed. This maintenance operation does not change any customer-specified values such as VPC config, KMS encryption, model, instance type, or instance count. RollingBack: Endpoint fails to scale up or down or change its variant weight and is in the process of rolling back to its previous configuration. Once the rollback completes, endpoint returns to an InService status. This transitional status only applies to an endpoint that has autoscaling enabled and is undergoing variant weight or capacity changes as part of an UpdateEndpointWeightsAndCapacities call or when the UpdateEndpointWeightsAndCapacities operation is called explicitly. InService: Endpoint is available to process incoming requests. Deleting: DeleteEndpoint is executing. Failed: Endpoint could not be created, updated, or re-scaled. Use DescribeEndpointOutput$FailureReason for information about the failure. DeleteEndpoint is the only operation that can be performed on a failed endpoint. To get a list of endpoints with a specified status, use the StatusEquals filter with a call to ListEndpoints. (OutOfService, Creating, Updating, SystemUpdating, RollingBack, InService, Deleting, Failed, UpdateRollbackFailed) |
last_modified_time | string (date-time) | A timestamp that shows when the endpoint was last modified. |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_endpoint | select | region | Returns the description of an endpoint. | |
list_endpoints | select | region | Lists endpoints. | |
create_endpoint | insert | region, EndpointName, EndpointConfigName | Creates an endpoint using the endpoint configuration specified in the request. SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the CreateEndpointConfig API. Use this API to deploy models using SageMaker hosting services. You must not delete an EndpointConfig that is in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig. The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account. When it receives the request, SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them. When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read. When SageMaker receives the request, it sets the endpoint status to Creating. After it creates the endpoint, it sets the status to InService. SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the DescribeEndpoint API. If any of the models hosted at this endpoint get model data from an Amazon S3 location, SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your Amazon Web Services account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region in the Amazon Web Services Identity and Access Management User Guide. To add the IAM role policies for using this API operation, go to the IAM console, and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the CreateEndpoint and CreateEndpointConfig API operations, add the following policies to the role. Option 1: For a full SageMaker access, search and attach the AmazonSageMakerFullAccess policy. Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"] "Resource": [ "arn:aws:sagemaker:region:account-id:endpoint/endpointName" "arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName" ] For more information, see SageMaker API Permissions: Actions, Permissions, and Resources Reference. | |
update_endpoint | update | region, EndpointName, EndpointConfigName | Deploys the EndpointConfig specified in the request to a new fleet of instances. SageMaker shifts endpoint traffic to the new instances with the updated endpoint configuration and then deletes the old instances using the previous EndpointConfig (there is no availability loss). For more information about how to control the update and traffic shifting process, see Update models in production. When SageMaker receives the request, it sets the endpoint status to Updating. After updating the endpoint, it sets the status to InService. To check the status of an endpoint, use the DescribeEndpoint API. You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges. | |
update_endpoint_weights_and_capacities | update | region, EndpointName, DesiredWeightsAndCapacities | Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint. When it receives the request, SageMaker sets the endpoint status to Updating. After updating the endpoint, it sets the status to InService. To check the status of an endpoint, use the DescribeEndpoint API. | |
delete_endpoint | delete | region | Deletes an endpoint. SageMaker frees up all of the resources that were deployed when the endpoint was created. SageMaker retires any custom KMS key grants associated with the endpoint, meaning you don't need to use the RevokeGrant API call. When you delete your endpoint, SageMaker asynchronously deletes associated endpoint resources such as KMS key grants. You might still see these resources in your account for a few minutes after deleting your endpoint. Do not delete or revoke the permissions for your ExecutionRoleArn , otherwise SageMaker cannot delete these resources. |
Parameters
Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_endpoint
- list_endpoints
Returns the description of an endpoint.
SELECT
async_inference_config,
creation_time,
data_capture_config,
endpoint_arn,
endpoint_config_name,
endpoint_name,
endpoint_status,
explainer_config,
failure_reason,
last_deployment_config,
last_modified_time,
metrics_config,
pending_deployment_summary,
production_variants,
shadow_production_variants
FROM aws.sagemaker.endpoints
WHERE region = '{{ region }}' -- required
;
Lists endpoints.
SELECT
creation_time,
endpoint_arn,
endpoint_name,
endpoint_status,
last_modified_time
FROM aws.sagemaker.endpoints
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_endpoint
- Manifest
Creates an endpoint using the endpoint configuration specified in the request. SageMaker uses the endpoint to provision resources and deploy models. You create the endpoint configuration with the CreateEndpointConfig API. Use this API to deploy models using SageMaker hosting services. You must not delete an EndpointConfig that is in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig. The endpoint name must be unique within an Amazon Web Services Region in your Amazon Web Services account. When it receives the request, SageMaker creates the endpoint, launches the resources (ML compute instances), and deploys the model(s) on them. When you call CreateEndpoint, a load call is made to DynamoDB to verify that your endpoint configuration exists. When you read data from a DynamoDB table supporting Eventually Consistent Reads , the response might not reflect the results of a recently completed write operation. The response might include some stale data. If the dependent entities are not yet in DynamoDB, this causes a validation error. If you repeat your read request after a short time, the response should return the latest data. So retry logic is recommended to handle these possible issues. We also recommend that customers call DescribeEndpointConfig before calling CreateEndpoint to minimize the potential impact of a DynamoDB eventually consistent read. When SageMaker receives the request, it sets the endpoint status to Creating. After it creates the endpoint, it sets the status to InService. SageMaker can then process incoming requests for inferences. To check the status of an endpoint, use the DescribeEndpoint API. If any of the models hosted at this endpoint get model data from an Amazon S3 location, SageMaker uses Amazon Web Services Security Token Service to download model artifacts from the S3 path you provided. Amazon Web Services STS is activated in your Amazon Web Services account by default. If you previously deactivated Amazon Web Services STS for a region, you need to reactivate Amazon Web Services STS for that region. For more information, see Activating and Deactivating Amazon Web Services STS in an Amazon Web Services Region in the Amazon Web Services Identity and Access Management User Guide. To add the IAM role policies for using this API operation, go to the IAM console, and choose Roles in the left navigation pane. Search the IAM role that you want to grant access to use the CreateEndpoint and CreateEndpointConfig API operations, add the following policies to the role. Option 1: For a full SageMaker access, search and attach the AmazonSageMakerFullAccess policy. Option 2: For granting a limited access to an IAM role, paste the following Action elements manually into the JSON file of the IAM role: "Action": ["sagemaker:CreateEndpoint", "sagemaker:CreateEndpointConfig"] "Resource": [ "arn:aws:sagemaker:region:account-id:endpoint/endpointName" "arn:aws:sagemaker:region:account-id:endpoint-config/endpointConfigName" ] For more information, see SageMaker API Permissions: Actions, Permissions, and Resources Reference.
INSERT INTO aws.sagemaker.endpoints (
EndpointName,
EndpointConfigName,
DeploymentConfig,
Tags,
region
)
SELECT
'{{ EndpointName }}' /* required */,
'{{ EndpointConfigName }}' /* required */,
'{{ DeploymentConfig }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
endpoint_arn
;
# Description fields are for documentation purposes
- name: endpoints
props:
- name: region
value: "{{ region }}"
description: Required parameter for the endpoints resource.
- name: EndpointName
value: "{{ EndpointName }}"
description: |
The name of the endpoint.The name must be unique within an Amazon Web Services Region in your Amazon Web Services account. The name is case-insensitive in CreateEndpoint, but the case is preserved and must be matched in InvokeEndpoint.
- name: EndpointConfigName
value: "{{ EndpointConfigName }}"
description: |
The name of an endpoint configuration. For more information, see CreateEndpointConfig.
- name: DeploymentConfig
description: |
The deployment configuration for an endpoint, which contains the desired deployment strategy and rollback configurations.
value:
BlueGreenUpdatePolicy:
TrafficRoutingConfiguration:
Type: "{{ Type }}"
WaitIntervalInSeconds: {{ WaitIntervalInSeconds }}
CanarySize:
Type: "{{ Type }}"
Value: {{ Value }}
LinearStepSize:
Type: "{{ Type }}"
Value: {{ Value }}
TerminationWaitInSeconds: {{ TerminationWaitInSeconds }}
MaximumExecutionTimeoutInSeconds: {{ MaximumExecutionTimeoutInSeconds }}
RollingUpdatePolicy:
MaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
WaitIntervalInSeconds: {{ WaitIntervalInSeconds }}
MaximumExecutionTimeoutInSeconds: {{ MaximumExecutionTimeoutInSeconds }}
RollbackMaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
AutoRollbackConfiguration:
Alarms:
- AlarmName: "{{ AlarmName }}"
- name: Tags
description: |
An array of key-value pairs. You can use tags to categorize your Amazon Web Services resources in different ways, for example, by purpose, owner, or environment. For more information, see Tagging Amazon Web Services Resources.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
UPDATE examples
- update_endpoint
- update_endpoint_weights_and_capacities
Deploys the EndpointConfig specified in the request to a new fleet of instances. SageMaker shifts endpoint traffic to the new instances with the updated endpoint configuration and then deletes the old instances using the previous EndpointConfig (there is no availability loss). For more information about how to control the update and traffic shifting process, see Update models in production. When SageMaker receives the request, it sets the endpoint status to Updating. After updating the endpoint, it sets the status to InService. To check the status of an endpoint, use the DescribeEndpoint API. You must not delete an EndpointConfig in use by an endpoint that is live or while the UpdateEndpoint or CreateEndpoint operations are being performed on the endpoint. To update an endpoint, you must create a new EndpointConfig. If you delete the EndpointConfig of an endpoint that is active or being created or updated you may lose visibility into the instance type the endpoint is using. The endpoint must be deleted in order to stop incurring charges.
UPDATE aws.sagemaker.endpoints
SET
EndpointName = '{{ EndpointName }}',
EndpointConfigName = '{{ EndpointConfigName }}',
RetainAllVariantProperties = {{ RetainAllVariantProperties }},
ExcludeRetainedVariantProperties = '{{ ExcludeRetainedVariantProperties }}',
DeploymentConfig = '{{ DeploymentConfig }}',
RetainDeploymentConfig = {{ RetainDeploymentConfig }}
WHERE
region = '{{ region }}' --required
AND EndpointName = '{{ EndpointName }}' --required
AND EndpointConfigName = '{{ EndpointConfigName }}' --required
RETURNING
endpoint_arn;
Updates variant weight of one or more variants associated with an existing endpoint, or capacity of one variant associated with an existing endpoint. When it receives the request, SageMaker sets the endpoint status to Updating. After updating the endpoint, it sets the status to InService. To check the status of an endpoint, use the DescribeEndpoint API.
UPDATE aws.sagemaker.endpoints
SET
EndpointName = '{{ EndpointName }}',
DesiredWeightsAndCapacities = '{{ DesiredWeightsAndCapacities }}'
WHERE
region = '{{ region }}' --required
AND EndpointName = '{{ EndpointName }}' --required
AND DesiredWeightsAndCapacities = '{{ DesiredWeightsAndCapacities }}' --required
RETURNING
endpoint_arn;
DELETE examples
- delete_endpoint
Deletes an endpoint. SageMaker frees up all of the resources that were deployed when the endpoint was created. SageMaker retires any custom KMS key grants associated with the endpoint, meaning you don't need to use the RevokeGrant API call. When you delete your endpoint, SageMaker asynchronously deletes associated endpoint resources such as KMS key grants. You might still see these resources in your account for a few minutes after deleting your endpoint. Do not delete or revoke the permissions for your ExecutionRoleArn , otherwise SageMaker cannot delete these resources.
DELETE FROM aws.sagemaker.endpoints
WHERE region = '{{ region }}' --required
;