Skip to main content

inference_components

Creates, updates, deletes, gets or lists an inference_components resource.

Overview

Nameinference_components
TypeResource
Idaws.sagemaker.inference_components

Fields

The following fields are returned by SELECT queries:

NameDatatypeDescription
creation_timestring (date-time)The time when the inference component was created.
endpoint_arnstringThe Amazon Resource Name (ARN) of the endpoint that hosts the inference component. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:endpoint/.*</code>)
endpoint_namestringThe name of the endpoint that hosts the inference component. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)
failure_reasonstringIf the inference component status is Failed, the reason for the failure.
inference_component_arnstringThe Amazon Resource Name (ARN) of the inference component.
inference_component_namestringThe name of the inference component. (pattern: <code>[a-zA-Z0-9]([-a-zA-Z0-9]*[a-zA-Z0-9])?</code>)
inference_component_statusstringThe status of the inference component. (InService, Creating, Updating, Failed, Deleting)
last_deployment_configobjectThe deployment and rollback settings that you assigned to the inference component.
last_modified_timestring (date-time)The time when the inference component was last updated.
runtime_configobjectDetails about the runtime settings for the model that is deployed with the inference component.
specificationobjectDetails about the resources that are deployed with this inference component.
specificationsarrayA list of specification summaries for the inference component, one per instance type. This parameter is populated when the inference component was created with multiple specifications. When this parameter is populated, the singular Specification parameter is not returned.
variant_namestringThe name of the production variant that hosts the inference component. (pattern: <code>[a-zA-Z0-9](-*[a-zA-Z0-9]){0,62}</code>)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
describe_inference_componentselectregionReturns information about an inference component.
list_inference_componentsselectregionLists the inference components in your account and their properties.
create_inference_componentinsertregion, InferenceComponentName, EndpointNameCreates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.
update_inference_component_runtime_configupdateregion, InferenceComponentName, DesiredRuntimeConfigRuntime settings for a model that is deployed with an inference component.
update_inference_componentupdateregion, InferenceComponentNameUpdates an inference component.
delete_inference_componentdeleteregionDeletes an inference component.

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.

NameDatatypeDescription
regionstringAWS region (default: us-east-1)

SELECT examples

Returns information about an inference component.

SELECT
creation_time,
endpoint_arn,
endpoint_name,
failure_reason,
inference_component_arn,
inference_component_name,
inference_component_status,
last_deployment_config,
last_modified_time,
runtime_config,
specification,
specifications,
variant_name
FROM aws.sagemaker.inference_components
WHERE region = '{{ region }}' -- required
;

INSERT examples

Creates an inference component, which is a SageMaker AI hosting object that you can use to deploy a model to an endpoint. In the inference component settings, you specify the model, the endpoint, and how the model utilizes the resources that the endpoint hosts. You can optimize resource utilization by tailoring how the required CPU cores, accelerators, and memory are allocated. You can deploy multiple inference components to an endpoint, where each inference component contains one model and the resource utilization needs for that individual model. After you deploy an inference component, you can directly invoke the associated model when you use the InvokeEndpoint API action.

INSERT INTO aws.sagemaker.inference_components (
InferenceComponentName,
EndpointName,
VariantName,
Specification,
Specifications,
RuntimeConfig,
Tags,
region
)
SELECT
'{{ InferenceComponentName }}' /* required */,
'{{ EndpointName }}' /* required */,
'{{ VariantName }}',
'{{ Specification }}',
'{{ Specifications }}',
'{{ RuntimeConfig }}',
'{{ Tags }}',
'{{ region }}'
RETURNING
inference_component_arn
;

UPDATE examples

Runtime settings for a model that is deployed with an inference component.

UPDATE aws.sagemaker.inference_components
SET
InferenceComponentName = '{{ InferenceComponentName }}',
DesiredRuntimeConfig = '{{ DesiredRuntimeConfig }}'
WHERE
region = '{{ region }}' --required
AND InferenceComponentName = '{{ InferenceComponentName }}' --required
AND DesiredRuntimeConfig = '{{ DesiredRuntimeConfig }}' --required
RETURNING
inference_component_arn;

DELETE examples

Deletes an inference component.

DELETE FROM aws.sagemaker.inference_components
WHERE region = '{{ region }}' --required
;