endpoint_configs
Creates, updates, deletes, gets or lists an endpoint_configs resource.
Overview
| Name | endpoint_configs |
| Type | Resource |
| Id | aws.sagemaker.endpoint_configs |
Fields
The following fields are returned by SELECT queries:
- describe_endpoint_config
- list_endpoint_configs
| 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 configuration was created. |
data_capture_config | object | Configuration to control how SageMaker AI captures inference data. |
enable_network_isolation | boolean | Indicates whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers. |
endpoint_config_arn | string | The Amazon Resource Name (ARN) of the endpoint configuration. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:endpoint-config/.*</code>) |
endpoint_config_name | string | Name of the SageMaker endpoint configuration. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
execution_role_arn | string | The Amazon Resource Name (ARN) of the IAM role that you assigned to the endpoint configuration. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
explainer_config | object | The configuration parameters for an explainer. |
kms_key_id | string | Amazon Web Services KMS key ID Amazon SageMaker uses to encrypt data when storing it on the ML storage volume attached to the instance. (pattern: <code>[a-zA-Z0-9:/_-]*</code>) |
metrics_config | object | The configuration parameters for utilization metrics. |
production_variants | array | An array of ProductionVariant objects, one for each model that you want to host at this endpoint. |
shadow_production_variants | array | An array of ProductionVariant 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. |
vpc_config | object | Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. |
| Name | Datatype | Description |
|---|---|---|
creation_time | string (date-time) | A timestamp that shows when the endpoint configuration was created. |
endpoint_config_arn | string | The Amazon Resource Name (ARN) of the endpoint configuration. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:endpoint-config/.*</code>) |
endpoint_config_name | string | The name of the endpoint configuration. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_endpoint_config | select | region | Returns the description of an endpoint configuration created using the CreateEndpointConfig API. | |
list_endpoint_configs | select | region | Lists endpoint configurations. | |
create_endpoint_config | insert | region, EndpointConfigName, ProductionVariants | Creates an endpoint configuration that SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want SageMaker to provision. Then you call the CreateEndpoint API. Use this API if you want to use SageMaker hosting services to deploy models into production. In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want SageMaker to provision. This includes the number and type of ML compute instances to deploy. If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B. 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. | |
delete_endpoint_config | delete | region | Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration. 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. 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. |
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_config
- list_endpoint_configs
Returns the description of an endpoint configuration created using the CreateEndpointConfig API.
SELECT
async_inference_config,
creation_time,
data_capture_config,
enable_network_isolation,
endpoint_config_arn,
endpoint_config_name,
execution_role_arn,
explainer_config,
kms_key_id,
metrics_config,
production_variants,
shadow_production_variants,
vpc_config
FROM aws.sagemaker.endpoint_configs
WHERE region = '{{ region }}' -- required
;
Lists endpoint configurations.
SELECT
creation_time,
endpoint_config_arn,
endpoint_config_name
FROM aws.sagemaker.endpoint_configs
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_endpoint_config
- Manifest
Creates an endpoint configuration that SageMaker hosting services uses to deploy models. In the configuration, you identify one or more models, created using the CreateModel API, to deploy and the resources that you want SageMaker to provision. Then you call the CreateEndpoint API. Use this API if you want to use SageMaker hosting services to deploy models into production. In the request, you define a ProductionVariant, for each model that you want to deploy. Each ProductionVariant parameter also describes the resources that you want SageMaker to provision. This includes the number and type of ML compute instances to deploy. If you are hosting multiple models, you also assign a VariantWeight to specify how much traffic you want to allocate to each model. For example, suppose that you want to host two models, A and B, and you assign traffic weight 2 for model A and 1 for model B. SageMaker distributes two-thirds of the traffic to Model A, and one-third to model B. 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.
INSERT INTO aws.sagemaker.endpoint_configs (
EndpointConfigName,
ProductionVariants,
DataCaptureConfig,
Tags,
KmsKeyId,
AsyncInferenceConfig,
ExplainerConfig,
ShadowProductionVariants,
ExecutionRoleArn,
VpcConfig,
EnableNetworkIsolation,
MetricsConfig,
region
)
SELECT
'{{ EndpointConfigName }}' /* required */,
'{{ ProductionVariants }}' /* required */,
'{{ DataCaptureConfig }}',
'{{ Tags }}',
'{{ KmsKeyId }}',
'{{ AsyncInferenceConfig }}',
'{{ ExplainerConfig }}',
'{{ ShadowProductionVariants }}',
'{{ ExecutionRoleArn }}',
'{{ VpcConfig }}',
{{ EnableNetworkIsolation }},
'{{ MetricsConfig }}',
'{{ region }}'
RETURNING
endpoint_config_arn
;
# Description fields are for documentation purposes
- name: endpoint_configs
props:
- name: region
value: "{{ region }}"
description: Required parameter for the endpoint_configs resource.
- name: EndpointConfigName
value: "{{ EndpointConfigName }}"
description: |
The name of the endpoint configuration. You specify this name in a CreateEndpoint request.
- name: ProductionVariants
description: |
An array of ProductionVariant objects, one for each model that you want to host at this endpoint.
value:
- VariantName: "{{ VariantName }}"
ModelName: "{{ ModelName }}"
InitialInstanceCount: {{ InitialInstanceCount }}
InstanceType: "{{ InstanceType }}"
InstancePools: "{{ InstancePools }}"
VariantInstanceProvisionTimeoutInSeconds: {{ VariantInstanceProvisionTimeoutInSeconds }}
InitialVariantWeight: {{ InitialVariantWeight }}
AcceleratorType: "{{ AcceleratorType }}"
CoreDumpConfig:
DestinationS3Uri: "{{ DestinationS3Uri }}"
KmsKeyId: "{{ KmsKeyId }}"
ServerlessConfig:
MemorySizeInMB: {{ MemorySizeInMB }}
MaxConcurrency: {{ MaxConcurrency }}
ProvisionedConcurrency: {{ ProvisionedConcurrency }}
VolumeSizeInGB: {{ VolumeSizeInGB }}
ModelDataDownloadTimeoutInSeconds: {{ ModelDataDownloadTimeoutInSeconds }}
ContainerStartupHealthCheckTimeoutInSeconds: {{ ContainerStartupHealthCheckTimeoutInSeconds }}
EnableSSMAccess: {{ EnableSSMAccess }}
ManagedInstanceScaling:
Status: "{{ Status }}"
MinInstanceCount: {{ MinInstanceCount }}
MaxInstanceCount: {{ MaxInstanceCount }}
ScaleInPolicy:
Strategy: "{{ Strategy }}"
MaximumStepSize: {{ MaximumStepSize }}
CooldownInMinutes: {{ CooldownInMinutes }}
RoutingConfig:
RoutingStrategy: "{{ RoutingStrategy }}"
PrefixAwareRoutingConfig:
PrefixLength: {{ PrefixLength }}
ConcurrencyThreshold: {{ ConcurrencyThreshold }}
InferenceAmiVersion: "{{ InferenceAmiVersion }}"
CapacityReservationConfig:
CapacityReservationPreference: "{{ CapacityReservationPreference }}"
MlReservationArn: "{{ MlReservationArn }}"
- name: DataCaptureConfig
description: |
Configuration to control how SageMaker AI captures inference data.
value:
EnableCapture: {{ EnableCapture }}
InitialSamplingPercentage: {{ InitialSamplingPercentage }}
DestinationS3Uri: "{{ DestinationS3Uri }}"
KmsKeyId: "{{ KmsKeyId }}"
CaptureOptions:
- CaptureMode: "{{ CaptureMode }}"
CaptureContentTypeHeader:
CsvContentTypes:
- "{{ CsvContentTypes }}"
JsonContentTypes:
- "{{ JsonContentTypes }}"
- 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 }}"
- name: KmsKeyId
value: "{{ KmsKeyId }}"
description: |
The Amazon Resource Name (ARN) of a Amazon Web Services Key Management Service key that SageMaker uses to encrypt data on the storage volume attached to the ML compute instance that hosts the endpoint. The KmsKeyId can be any of the following formats: Key ID: 1234abcd-12ab-34cd-56ef-1234567890ab Key ARN: arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab Alias name: alias/ExampleAlias Alias name ARN: arn:aws:kms:us-west-2:111122223333:alias/ExampleAlias The KMS key policy must grant permission to the IAM role that you specify in your CreateEndpoint, UpdateEndpoint requests. For more information, refer to the Amazon Web Services Key Management Service section Using Key Policies in Amazon Web Services KMS Certain Nitro-based instances include local storage, dependent on the instance type. Local storage volumes are encrypted using a hardware module on the instance. If any of the models that you specify in the ProductionVariants parameter use nitro-based instances with local storage, the KmsKeyId parameter does not encrypt instance local storage. For a list of instance types that support local instance storage, see Instance Store Volumes. For more information about local instance storage encryption, see SSD Instance Store Volumes.
- name: AsyncInferenceConfig
description: |
Specifies configuration for how an endpoint performs asynchronous inference. This is a required field in order for your Endpoint to be invoked using InvokeEndpointAsync.
value:
ClientConfig:
MaxConcurrentInvocationsPerInstance: {{ MaxConcurrentInvocationsPerInstance }}
OutputConfig:
KmsKeyId: "{{ KmsKeyId }}"
S3OutputPath: "{{ S3OutputPath }}"
NotificationConfig:
SuccessTopic: "{{ SuccessTopic }}"
ErrorTopic: "{{ ErrorTopic }}"
IncludeInferenceResponseIn:
- "{{ IncludeInferenceResponseIn }}"
S3FailurePath: "{{ S3FailurePath }}"
- name: ExplainerConfig
description: |
A member of CreateEndpointConfig that enables explainers.
value:
ClarifyExplainerConfig:
EnableExplanations: "{{ EnableExplanations }}"
InferenceConfig:
FeaturesAttribute: "{{ FeaturesAttribute }}"
ContentTemplate: "{{ ContentTemplate }}"
MaxRecordCount: {{ MaxRecordCount }}
MaxPayloadInMB: {{ MaxPayloadInMB }}
ProbabilityIndex: {{ ProbabilityIndex }}
LabelIndex: {{ LabelIndex }}
ProbabilityAttribute: "{{ ProbabilityAttribute }}"
LabelAttribute: "{{ LabelAttribute }}"
LabelHeaders:
- "{{ LabelHeaders }}"
FeatureHeaders:
- "{{ FeatureHeaders }}"
FeatureTypes:
- "{{ FeatureTypes }}"
ShapConfig:
ShapBaselineConfig:
MimeType: "{{ MimeType }}"
ShapBaseline: "{{ ShapBaseline }}"
ShapBaselineUri: "{{ ShapBaselineUri }}"
NumberOfSamples: {{ NumberOfSamples }}
UseLogit: {{ UseLogit }}
Seed: {{ Seed }}
TextConfig:
Language: "{{ Language }}"
Granularity: "{{ Granularity }}"
- name: ShadowProductionVariants
description: |
An array of ProductionVariant 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. If you use this field, you can only specify one variant for ProductionVariants and one variant for ShadowProductionVariants.
value:
- VariantName: "{{ VariantName }}"
ModelName: "{{ ModelName }}"
InitialInstanceCount: {{ InitialInstanceCount }}
InstanceType: "{{ InstanceType }}"
InstancePools: "{{ InstancePools }}"
VariantInstanceProvisionTimeoutInSeconds: {{ VariantInstanceProvisionTimeoutInSeconds }}
InitialVariantWeight: {{ InitialVariantWeight }}
AcceleratorType: "{{ AcceleratorType }}"
CoreDumpConfig:
DestinationS3Uri: "{{ DestinationS3Uri }}"
KmsKeyId: "{{ KmsKeyId }}"
ServerlessConfig:
MemorySizeInMB: {{ MemorySizeInMB }}
MaxConcurrency: {{ MaxConcurrency }}
ProvisionedConcurrency: {{ ProvisionedConcurrency }}
VolumeSizeInGB: {{ VolumeSizeInGB }}
ModelDataDownloadTimeoutInSeconds: {{ ModelDataDownloadTimeoutInSeconds }}
ContainerStartupHealthCheckTimeoutInSeconds: {{ ContainerStartupHealthCheckTimeoutInSeconds }}
EnableSSMAccess: {{ EnableSSMAccess }}
ManagedInstanceScaling:
Status: "{{ Status }}"
MinInstanceCount: {{ MinInstanceCount }}
MaxInstanceCount: {{ MaxInstanceCount }}
ScaleInPolicy:
Strategy: "{{ Strategy }}"
MaximumStepSize: {{ MaximumStepSize }}
CooldownInMinutes: {{ CooldownInMinutes }}
RoutingConfig:
RoutingStrategy: "{{ RoutingStrategy }}"
PrefixAwareRoutingConfig:
PrefixLength: {{ PrefixLength }}
ConcurrencyThreshold: {{ ConcurrencyThreshold }}
InferenceAmiVersion: "{{ InferenceAmiVersion }}"
CapacityReservationConfig:
CapacityReservationPreference: "{{ CapacityReservationPreference }}"
MlReservationArn: "{{ MlReservationArn }}"
- name: ExecutionRoleArn
value: "{{ ExecutionRoleArn }}"
description: |
The Amazon Resource Name (ARN) of an IAM role that Amazon SageMaker AI can assume to perform actions on your behalf. For more information, see SageMaker AI Roles. To be able to pass this role to Amazon SageMaker AI, the caller of this action must have the iam:PassRole permission.
- name: VpcConfig
description: |
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC.
value:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
Subnets:
- "{{ Subnets }}"
- name: EnableNetworkIsolation
value: {{ EnableNetworkIsolation }}
description: |
Sets whether all model containers deployed to the endpoint are isolated. If they are, no inbound or outbound network calls can be made to or from the model containers.
- name: MetricsConfig
description: |
The configuration parameters for utilization metrics.
value:
EnableEnhancedMetrics: {{ EnableEnhancedMetrics }}
EnableDetailedObservability: {{ EnableDetailedObservability }}
MetricPublishFrequencyInSeconds: {{ MetricPublishFrequencyInSeconds }}
DELETE examples
- delete_endpoint_config
Deletes an endpoint configuration. The DeleteEndpointConfig API deletes only the specified configuration. It does not delete endpoints created using the configuration. 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. 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.
DELETE FROM aws.sagemaker.endpoint_configs
WHERE region = '{{ region }}' --required
;