inference_components
Creates, updates, deletes or gets an inference_component resource or lists inference_components in a region
Overview
| Name | inference_components |
| Type | Resource |
| Description | Resource Type definition for AWS::SageMaker::InferenceComponent |
| Id | awscc.sagemaker.inference_components |
Fields
- get (all properties)
- list (identifiers only)
| Name | Datatype | Description |
|---|---|---|
inference_component_arn | string | The Amazon Resource Name (ARN) of the inference component |
inference_component_name | string | The name of the inference component |
endpoint_arn | string | The Amazon Resource Name (ARN) of the endpoint the inference component is associated with |
endpoint_name | string | The name of the endpoint used to run the monitoring job. |
variant_name | string | The name of the endpoint variant the inference component is associated with |
failure_reason | string | The failure reason if the inference component is in a failed state |
specification | object | The specification for the inference component |
runtime_config | object | The runtime config for the inference component |
deployment_config | object | The deployment config for the inference component |
inference_component_status | string | |
creation_time | string | |
tags | array | An array of tags to apply to the resource |
region | string | AWS region. |
| Name | Datatype | Description |
|---|---|---|
inference_component_arn | string | The Amazon Resource Name (ARN) of the inference component |
region | string | AWS region. |
For more information, see AWS::SageMaker::InferenceComponent.
Methods
| Name | Resource | Accessible by | Required Params |
|---|---|---|---|
create_resource | inference_components | INSERT | EndpointName, Specification, region |
delete_resource | inference_components | DELETE | Identifier, region |
update_resource | inference_components | UPDATE | Identifier, PatchDocument, region |
list_resources | inference_components_list_only | SELECT | region |
get_resource | inference_components | SELECT | Identifier, region |
SELECT examples
- get (all properties)
- list (identifiers only)
Gets all properties from an individual inference_component.
SELECT
region,
inference_component_arn,
inference_component_name,
endpoint_arn,
endpoint_name,
variant_name,
failure_reason,
specification,
runtime_config,
deployment_config,
inference_component_status,
creation_time,
last_modified_time,
tags
FROM awscc.sagemaker.inference_components
WHERE
region = '{{ region }}' AND
Identifier = '{{ inference_component_arn }}';
Lists all inference_components in a region.
SELECT
region,
inference_component_arn
FROM awscc.sagemaker.inference_components_list_only
WHERE
region = '{{ region }}';
INSERT example
Use the following StackQL query and manifest file to create a new inference_component resource, using stack-deploy.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO awscc.sagemaker.inference_components (
EndpointName,
Specification,
region
)
SELECT
'{{ endpoint_name }}',
'{{ specification }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
/*+ create */
INSERT INTO awscc.sagemaker.inference_components (
InferenceComponentName,
EndpointArn,
EndpointName,
VariantName,
Specification,
RuntimeConfig,
DeploymentConfig,
Tags,
region
)
SELECT
'{{ inference_component_name }}',
'{{ endpoint_arn }}',
'{{ endpoint_name }}',
'{{ variant_name }}',
'{{ specification }}',
'{{ runtime_config }}',
'{{ deployment_config }}',
'{{ tags }}',
'{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: inference_component
props:
- name: inference_component_name
value: '{{ inference_component_name }}'
- name: endpoint_arn
value: '{{ endpoint_arn }}'
- name: endpoint_name
value: '{{ endpoint_name }}'
- name: variant_name
value: '{{ variant_name }}'
- name: specification
value:
model_name: '{{ model_name }}'
base_inference_component_name: '{{ base_inference_component_name }}'
container:
deployed_image:
specified_image: '{{ specified_image }}'
resolved_image: null
resolution_time: '{{ resolution_time }}'
image: null
artifact_url: '{{ artifact_url }}'
environment: {}
startup_parameters:
model_data_download_timeout_in_seconds: '{{ model_data_download_timeout_in_seconds }}'
container_startup_health_check_timeout_in_seconds: null
compute_resource_requirements:
number_of_cpu_cores_required: null
number_of_accelerator_devices_required: null
min_memory_required_in_mb: '{{ min_memory_required_in_mb }}'
max_memory_required_in_mb: null
- name: runtime_config
value:
copy_count: '{{ copy_count }}'
desired_copy_count: null
current_copy_count: null
- name: deployment_config
value:
rolling_update_policy:
maximum_batch_size:
type: '{{ type }}'
value: '{{ value }}'
wait_interval_in_seconds: '{{ wait_interval_in_seconds }}'
rollback_maximum_batch_size: null
maximum_execution_timeout_in_seconds: '{{ maximum_execution_timeout_in_seconds }}'
auto_rollback_configuration:
alarms:
- alarm_name: '{{ alarm_name }}'
- name: tags
value:
- value: '{{ value }}'
key: '{{ key }}'
UPDATE example
Use the following StackQL query and manifest file to update a inference_component resource, using stack-deploy.
/*+ update */
UPDATE awscc.sagemaker.inference_components
SET PatchDocument = string('{{ {
"InferenceComponentName": inference_component_name,
"EndpointArn": endpoint_arn,
"EndpointName": endpoint_name,
"VariantName": variant_name,
"DeploymentConfig": deployment_config,
"Tags": tags
} | generate_patch_document }}')
WHERE
region = '{{ region }}' AND
Identifier = '{{ inference_component_arn }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
DELETE example
/*+ delete */
DELETE FROM awscc.sagemaker.inference_components
WHERE
Identifier = '{{ inference_component_arn }}' AND
region = '{{ region }}'
RETURNING
ErrorCode,
EventTime,
Identifier,
Operation,
OperationStatus,
RequestToken,
ResourceModel,
RetryAfter,
StatusMessage,
TypeName
;
Additional Parameters
Mutable resources in the Cloud Control provider support additional optional parameters which can be supplied with INSERT, UPDATE, or DELETE operations. These include:
| Parameter | Description |
|---|---|
ClientToken | A unique identifier to ensure the idempotency of the resource request.This allows the provider to accurately distinguish between retries and new requests.A client token is valid for 36 hours once used. After that, a resource request with the same client token is treated as a new request. If you do not specify a client token, one is generated for inclusion in the request. |
RoleArn | The ARN of the IAM role used to perform this resource operation.The role specified must have the permissions required for this operation.If you do not specify a role, a temporary session is created using your AWS user credentials. |
TypeVersionId | For private resource types, the type version to use in this resource operation.If you do not specify a resource version, the default version is used. |
Permissions
To operate on the inference_components resource, the following permissions are required:
- Create
- Update
- Delete
- Read
- List
sagemaker:AddTags,
sagemaker:ListTags,
sagemaker:CreateInferenceComponent,
sagemaker:DescribeInferenceComponent
sagemaker:UpdateInferenceComponent,
sagemaker:UpdateInferenceComponentRuntimeConfig,
sagemaker:DescribeInferenceComponent,
sagemaker:AddTags,
sagemaker:ListTags,
sagemaker:DeleteTags
sagemaker:DescribeInferenceComponent,
sagemaker:DeleteInferenceComponent,
sagemaker:DeleteTags
sagemaker:DescribeInferenceComponent,
sagemaker:ListTags
sagemaker:ListInferenceComponents,
sagemaker:DescribeInferenceComponent,
sagemaker:ListTags