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 | aws.sagemaker.inference_components |
Fields
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 |
inference_component_status | string | |
creation_time | string | |
last_modified_time | string | |
tags | array | An array of tags to apply to the resource |
region | string | AWS region. |
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | EndpointName, VariantName, Specification, RuntimeConfig, region |
delete_resource | DELETE | data__Identifier, region |
update_resource | UPDATE | data__Identifier, data__PatchDocument, region |
list_resources | SELECT | region |
get_resource | SELECT | data__Identifier, region |
SELECT
examples
Gets all inference_components
in a region.
SELECT
region,
inference_component_arn,
inference_component_name,
endpoint_arn,
endpoint_name,
variant_name,
failure_reason,
specification,
runtime_config,
inference_component_status,
creation_time,
last_modified_time,
tags
FROM aws.sagemaker.inference_components
WHERE region = 'us-east-1';
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,
inference_component_status,
creation_time,
last_modified_time,
tags
FROM aws.sagemaker.inference_components
WHERE region = 'us-east-1' AND data__Identifier = '<InferenceComponentArn>';
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 aws.sagemaker.inference_components (
EndpointName,
VariantName,
Specification,
RuntimeConfig,
region
)
SELECT
'{{ EndpointName }}',
'{{ VariantName }}',
'{{ Specification }}',
'{{ RuntimeConfig }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.inference_components (
InferenceComponentName,
EndpointArn,
EndpointName,
VariantName,
Specification,
RuntimeConfig,
Tags,
region
)
SELECT
'{{ InferenceComponentName }}',
'{{ EndpointArn }}',
'{{ EndpointName }}',
'{{ VariantName }}',
'{{ Specification }}',
'{{ RuntimeConfig }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: inference_component
props:
- name: InferenceComponentName
value: '{{ InferenceComponentName }}'
- name: EndpointArn
value: '{{ EndpointArn }}'
- name: EndpointName
value: '{{ EndpointName }}'
- name: VariantName
value: '{{ VariantName }}'
- name: Specification
value:
ModelName: '{{ ModelName }}'
Container:
DeployedImage:
SpecifiedImage: '{{ SpecifiedImage }}'
ResolvedImage: null
ResolutionTime: '{{ ResolutionTime }}'
Image: null
ArtifactUrl: '{{ ArtifactUrl }}'
Environment: {}
StartupParameters:
ModelDataDownloadTimeoutInSeconds: '{{ ModelDataDownloadTimeoutInSeconds }}'
ContainerStartupHealthCheckTimeoutInSeconds: null
ComputeResourceRequirements:
NumberOfCpuCoresRequired: null
NumberOfAcceleratorDevicesRequired: null
MinMemoryRequiredInMb: '{{ MinMemoryRequiredInMb }}'
MaxMemoryRequiredInMb: null
- name: RuntimeConfig
value:
CopyCount: '{{ CopyCount }}'
DesiredCopyCount: null
CurrentCopyCount: null
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.sagemaker.inference_components
WHERE data__Identifier = '<InferenceComponentArn>'
AND region = 'us-east-1';
Permissions
To operate on the inference_components
resource, the following permissions are required:
Create
sagemaker:AddTags,
sagemaker:ListTags,
sagemaker:CreateInferenceComponent,
sagemaker:DescribeInferenceComponent
Update
sagemaker:UpdateInferenceComponent,
sagemaker:UpdateInferenceComponentRuntimeConfig,
sagemaker:DescribeInferenceComponent,
sagemaker:AddTags,
sagemaker:ListTags,
sagemaker:DeleteTags
Delete
sagemaker:DescribeInferenceComponent,
sagemaker:DeleteInferenceComponent,
sagemaker:DeleteTags
Read
sagemaker:DescribeInferenceComponent,
sagemaker:ListTags
List
sagemaker:ListInferenceComponents,
sagemaker:DescribeInferenceComponent,
sagemaker:ListTags