Skip to main content

clusters

Creates, updates, deletes or gets a cluster resource or lists clusters in a region

Overview

Nameclusters
TypeResource
DescriptionResource Type definition for AWS::SageMaker::Cluster
Idaws.sagemaker.clusters

Fields

NameDatatypeDescription
cluster_arnstringThe Amazon Resource Name (ARN) of the HyperPod Cluster.
vpc_configobjectSpecifies 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_recoverystringIf 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_timestringThe time at which the HyperPod cluster was created.
instance_groupsarrayThe instance groups of the SageMaker HyperPod cluster.
cluster_namestringThe name of the HyperPod Cluster.
failure_messagestringThe failure message of the HyperPod Cluster.
orchestratorobjectSpecifies parameter(s) specific to the orchestrator, e.g. specify the EKS cluster.
cluster_statusstringThe status of the HyperPod Cluster.
tagsarrayCustom 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.
regionstringAWS region.

For more information, see AWS::SageMaker::Cluster.

Methods

NameAccessible byRequired Params
create_resourceINSERTInstanceGroups, region
delete_resourceDELETEdata__Identifier, region
update_resourceUPDATEdata__Identifier, data__PatchDocument, region
list_resourcesSELECTregion
get_resourceSELECTdata__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.

/*+ create */
INSERT INTO aws.sagemaker.clusters (
InstanceGroups,
region
)
SELECT
'{{ InstanceGroups }}',
'{{ region }}';

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