clusters
Creates, updates, deletes or gets a cluster
resource or lists clusters
in a region
Overview
Name | clusters |
Type | Resource |
Description | Resource Type definition for AWS::SageMaker::Cluster |
Id | aws.sagemaker.clusters |
Fields
Name | Datatype | Description |
---|---|---|
cluster_arn | string | The Amazon Resource Name (ARN) of the HyperPod Cluster. |
vpc_config | object | Specifies a VPC that your training jobs and hosted models have access to. Control access to and from your training and model containers by configuring the VPC. |
node_recovery | string | If node auto-recovery is set to true, faulty nodes will be replaced or rebooted when a failure is detected. If set to false, nodes will be labelled when a fault is detected. |
creation_time | string | The time at which the HyperPod cluster was created. |
instance_groups | array | The instance groups of the SageMaker HyperPod cluster. |
cluster_name | string | The name of the HyperPod Cluster. |
failure_message | string | The failure message of the HyperPod Cluster. |
orchestrator | object | Specifies parameter(s) specific to the orchestrator, e.g. specify the EKS cluster. |
cluster_status | string | The status of the HyperPod Cluster. |
tags | array | Custom tags for managing the SageMaker HyperPod cluster as an AWS resource. You can add tags to your cluster in the same way you add them in other AWS services that support tagging. |
region | string | AWS region. |
For more information, see AWS::SageMaker::Cluster
.
Methods
Name | Accessible by | Required Params |
---|---|---|
create_resource | INSERT | InstanceGroups, 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 clusters
in a region.
SELECT
region,
cluster_arn,
vpc_config,
node_recovery,
creation_time,
instance_groups,
cluster_name,
failure_message,
orchestrator,
cluster_status,
tags
FROM aws.sagemaker.clusters
WHERE region = 'us-east-1';
Gets all properties from an individual cluster
.
SELECT
region,
cluster_arn,
vpc_config,
node_recovery,
creation_time,
instance_groups,
cluster_name,
failure_message,
orchestrator,
cluster_status,
tags
FROM aws.sagemaker.clusters
WHERE region = 'us-east-1' AND data__Identifier = '<ClusterArn>';
INSERT
example
Use the following StackQL query and manifest file to create a new cluster
resource, using stack-deploy
.
- Required Properties
- All Properties
- Manifest
/*+ create */
INSERT INTO aws.sagemaker.clusters (
InstanceGroups,
region
)
SELECT
'{{ InstanceGroups }}',
'{{ region }}';
/*+ create */
INSERT INTO aws.sagemaker.clusters (
VpcConfig,
NodeRecovery,
InstanceGroups,
ClusterName,
Orchestrator,
Tags,
region
)
SELECT
'{{ VpcConfig }}',
'{{ NodeRecovery }}',
'{{ InstanceGroups }}',
'{{ ClusterName }}',
'{{ Orchestrator }}',
'{{ Tags }}',
'{{ region }}';
version: 1
name: stack name
description: stack description
providers:
- aws
globals:
- name: region
value: '{{ vars.AWS_REGION }}'
resources:
- name: cluster
props:
- name: VpcConfig
value:
SecurityGroupIds:
- '{{ SecurityGroupIds[0] }}'
Subnets:
- '{{ Subnets[0] }}'
- name: NodeRecovery
value: '{{ NodeRecovery }}'
- name: InstanceGroups
value:
- OverrideVpcConfig: null
InstanceCount: '{{ InstanceCount }}'
OnStartDeepHealthChecks:
- '{{ OnStartDeepHealthChecks[0] }}'
InstanceGroupName: '{{ InstanceGroupName }}'
InstanceStorageConfigs:
- {}
CurrentCount: '{{ CurrentCount }}'
LifeCycleConfig:
SourceS3Uri: '{{ SourceS3Uri }}'
OnCreate: '{{ OnCreate }}'
InstanceType: '{{ InstanceType }}'
ThreadsPerCore: '{{ ThreadsPerCore }}'
ExecutionRole: '{{ ExecutionRole }}'
- name: ClusterName
value: '{{ ClusterName }}'
- name: Orchestrator
value:
Eks:
ClusterArn: '{{ ClusterArn }}'
- name: Tags
value:
- Value: '{{ Value }}'
Key: '{{ Key }}'
DELETE
example
/*+ delete */
DELETE FROM aws.sagemaker.clusters
WHERE data__Identifier = '<ClusterArn>'
AND region = 'us-east-1';
Permissions
To operate on the clusters
resource, the following permissions are required:
Read
sagemaker:DescribeCluster,
sagemaker:ListTags
Create
sagemaker:CreateCluster,
sagemaker:DescribeCluster,
sagemaker:AddTags,
sagemaker:ListTags,
eks:DescribeAccessEntry,
eks:DescribeCluster,
eks:CreateAccessEntry,
eks:DeleteAccessEntry,
eks:AssociateAccessPolicy,
iam:CreateServiceLinkedRole,
iam:PassRole
Update
sagemaker:UpdateCluster,
sagemaker:DescribeCluster,
sagemaker:ListTags,
sagemaker:AddTags,
sagemaker:DeleteTags,
eks:DescribeAccessEntry,
eks:DescribeCluster,
eks:CreateAccessEntry,
eks:DeleteAccessEntry,
iam:PassRole
List
sagemaker:ListClusters
Delete
sagemaker:DeleteCluster,
sagemaker:DescribeCluster,
eks:DescribeAccessEntry,
eks:DeleteAccessEntry