clusters
Creates, updates, deletes, gets or lists a clusters resource.
Overview
| Name | clusters |
| Type | Resource |
| Id | aws.sagemaker.clusters |
Fields
The following fields are returned by SELECT queries:
- describe_cluster
- list_clusters
| Name | Datatype | Description |
|---|---|---|
auto_scaling | object | The current autoscaling configuration and status for the autoscaler. |
cluster_arn | string | The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:cluster/[a-z0-9]{12}</code>) |
cluster_name | string | The name of the SageMaker HyperPod cluster. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9])</code>) |
cluster_role | string | The Amazon Resource Name (ARN) of the IAM role that HyperPod uses for cluster autoscaling operations. (pattern: <code>arn:aws[a-z-]*:iam::\d{12}:role/?[a-zA-Z_0-9+=,.@-_/]+</code>) |
cluster_status | string | The status of the SageMaker HyperPod cluster. (Creating, Deleting, Failed, InService, RollingBack, SystemUpdating, Updating) |
creation_time | string (date-time) | The time when the SageMaker Cluster is created. |
failure_message | string | The failure message of the SageMaker HyperPod cluster. |
instance_groups | array | The instance groups of the SageMaker HyperPod cluster. |
node_provisioning_mode | string | The mode used for provisioning nodes in the cluster. (Continuous) |
node_recovery | string | The node recovery mode configured for the SageMaker HyperPod cluster. (Automatic, None) |
orchestrator | object | The type of orchestrator used for the SageMaker HyperPod cluster. |
restricted_instance_groups | array | The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster. |
restricted_instance_groups_config | object | The configuration for the restricted instance groups (RIG) in the SageMaker HyperPod cluster. |
tiered_storage_config | object | The current configuration for managed tier checkpointing on the HyperPod cluster. For example, this shows whether the feature is enabled and the percentage of cluster memory allocated for checkpoint storage. |
vpc_config | object | Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC. |
| Name | Datatype | Description |
|---|---|---|
cluster_arn | string | The Amazon Resource Name (ARN) of the SageMaker HyperPod cluster. (pattern: <code>arn:aws[a-z-]:sagemaker:[a-z0-9-]:[0-9]{12}:cluster/[a-z0-9]{12}</code>) |
cluster_name | string | The name of the SageMaker HyperPod cluster. (pattern: <code>[a-zA-Z0-9](-[a-zA-Z0-9])</code>) |
cluster_status | string | The status of the SageMaker HyperPod cluster. (Creating, Deleting, Failed, InService, RollingBack, SystemUpdating, Updating) |
creation_time | string (date-time) | The time when the SageMaker HyperPod cluster is created. |
image_version_status | string | The aggregate status of the image version across the cluster's instance groups. (UpToDate, UpdateAvailable, SecurityUpdateRequired, EndOfLife) |
training_plan_arns | array | A list of Amazon Resource Names (ARNs) of the training plans associated with this cluster. For more information about how to reserve GPU capacity for your SageMaker HyperPod clusters using Amazon SageMaker Training Plan, see CreateTrainingPlan . |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
describe_cluster | select | region | Retrieves information of a SageMaker HyperPod cluster. | |
list_clusters | select | region | Retrieves the list of SageMaker HyperPod clusters. | |
create_cluster | insert | region, ClusterName | Creates an Amazon SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide. | |
update_cluster | update | region, ClusterName | Updates a SageMaker HyperPod cluster. | |
delete_cluster | delete | region | Delete a SageMaker HyperPod cluster. | |
start_cluster_health_check | exec | region, ClusterName, DeepHealthCheckConfigurations | Start deep health checks for a SageMaker HyperPod cluster. You can use DescribeClusterNode API to track progress of the deep health checks. The unhealthy nodes will be automatically rebooted or replaced. Please see Resilience-related Kubernetes labels by SageMaker HyperPod for details. | |
update_cluster_software | exec | region, ClusterName | Updates the platform software of a SageMaker HyperPod cluster for security patching. To learn how to use this API, see Update the SageMaker HyperPod platform software of a cluster. The UpgradeClusterSoftware API call may impact your SageMaker HyperPod cluster uptime and availability. Plan accordingly to mitigate potential disruptions to your workloads. |
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.
| Name | Datatype | Description |
|---|---|---|
region | string | AWS region (default: us-east-1) |
SELECT examples
- describe_cluster
- list_clusters
Retrieves information of a SageMaker HyperPod cluster.
SELECT
auto_scaling,
cluster_arn,
cluster_name,
cluster_role,
cluster_status,
creation_time,
failure_message,
instance_groups,
node_provisioning_mode,
node_recovery,
orchestrator,
restricted_instance_groups,
restricted_instance_groups_config,
tiered_storage_config,
vpc_config
FROM aws.sagemaker.clusters
WHERE region = '{{ region }}' -- required
;
Retrieves the list of SageMaker HyperPod clusters.
SELECT
cluster_arn,
cluster_name,
cluster_status,
creation_time,
image_version_status,
training_plan_arns
FROM aws.sagemaker.clusters
WHERE region = '{{ region }}' -- required
;
INSERT examples
- create_cluster
- Manifest
Creates an Amazon SageMaker HyperPod cluster. SageMaker HyperPod is a capability of SageMaker for creating and managing persistent clusters for developing large machine learning models, such as large language models (LLMs) and diffusion models. To learn more, see Amazon SageMaker HyperPod in the Amazon SageMaker Developer Guide.
INSERT INTO aws.sagemaker.clusters (
ClusterName,
InstanceGroups,
RestrictedInstanceGroups,
RestrictedInstanceGroupsConfig,
VpcConfig,
Tags,
Orchestrator,
NodeRecovery,
TieredStorageConfig,
NodeProvisioningMode,
ClusterRole,
AutoScaling,
region
)
SELECT
'{{ ClusterName }}' /* required */,
'{{ InstanceGroups }}',
'{{ RestrictedInstanceGroups }}',
'{{ RestrictedInstanceGroupsConfig }}',
'{{ VpcConfig }}',
'{{ Tags }}',
'{{ Orchestrator }}',
'{{ NodeRecovery }}',
'{{ TieredStorageConfig }}',
'{{ NodeProvisioningMode }}',
'{{ ClusterRole }}',
'{{ AutoScaling }}',
'{{ region }}'
RETURNING
cluster_arn
;
# Description fields are for documentation purposes
- name: clusters
props:
- name: region
value: "{{ region }}"
description: Required parameter for the clusters resource.
- name: ClusterName
value: "{{ ClusterName }}"
description: |
The name for the new SageMaker HyperPod cluster.
- name: InstanceGroups
description: |
The instance groups to be created in the SageMaker HyperPod cluster.
value:
- InstanceCount: {{ InstanceCount }}
MinInstanceCount: {{ MinInstanceCount }}
InstanceGroupName: "{{ InstanceGroupName }}"
InstanceType: "{{ InstanceType }}"
InstanceRequirements:
InstanceTypes:
- "{{ InstanceTypes }}"
LifeCycleConfig:
SourceS3Uri: "{{ SourceS3Uri }}"
OnCreate: "{{ OnCreate }}"
OnInitComplete: "{{ OnInitComplete }}"
ExecutionRole: "{{ ExecutionRole }}"
ThreadsPerCore: {{ ThreadsPerCore }}
InstanceStorageConfigs: "{{ InstanceStorageConfigs }}"
OnStartDeepHealthChecks: "{{ OnStartDeepHealthChecks }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
OverrideVpcConfig:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
Subnets:
- "{{ Subnets }}"
ScheduledUpdateConfig:
ScheduleExpression: "{{ ScheduleExpression }}"
DeploymentConfig:
RollingUpdatePolicy:
MaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
RollbackMaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
WaitIntervalInSeconds: {{ WaitIntervalInSeconds }}
AutoRollbackConfiguration:
- AlarmName: "{{ AlarmName }}"
ImageId: "{{ ImageId }}"
AutoPatchConfig:
PatchingStrategy: "{{ PatchingStrategy }}"
PatchSchedule:
NextPatchDate: "{{ NextPatchDate }}"
DeploymentConfig:
RollingUpdatePolicy:
MaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
RollbackMaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
WaitIntervalInSeconds: {{ WaitIntervalInSeconds }}
AutoRollbackConfiguration:
- AlarmName: "{{ AlarmName }}"
ImageReleaseVersion: "{{ ImageReleaseVersion }}"
KubernetesConfig:
Labels: "{{ Labels }}"
Taints:
- Key: "{{ Key }}"
Value: "{{ Value }}"
Effect: "{{ Effect }}"
SlurmConfig:
NodeType: "{{ NodeType }}"
PartitionNames:
- "{{ PartitionNames }}"
CapacityRequirements:
Spot: "{{ Spot }}"
OnDemand: "{{ OnDemand }}"
NetworkInterface:
InterfaceType: "{{ InterfaceType }}"
- name: RestrictedInstanceGroups
description: |
The specialized instance groups for training models like Amazon Nova to be created in the SageMaker HyperPod cluster.
value:
- InstanceCount: {{ InstanceCount }}
InstanceGroupName: "{{ InstanceGroupName }}"
InstanceType: "{{ InstanceType }}"
ExecutionRole: "{{ ExecutionRole }}"
ThreadsPerCore: {{ ThreadsPerCore }}
InstanceStorageConfigs: "{{ InstanceStorageConfigs }}"
OnStartDeepHealthChecks: "{{ OnStartDeepHealthChecks }}"
TrainingPlanArn: "{{ TrainingPlanArn }}"
OverrideVpcConfig:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
Subnets:
- "{{ Subnets }}"
ScheduledUpdateConfig:
ScheduleExpression: "{{ ScheduleExpression }}"
DeploymentConfig:
RollingUpdatePolicy:
MaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
RollbackMaximumBatchSize:
Type: "{{ Type }}"
Value: {{ Value }}
WaitIntervalInSeconds: {{ WaitIntervalInSeconds }}
AutoRollbackConfiguration:
- AlarmName: "{{ AlarmName }}"
EnvironmentConfig:
FSxLustreConfig:
SizeInGiB: {{ SizeInGiB }}
PerUnitStorageThroughput: {{ PerUnitStorageThroughput }}
- name: RestrictedInstanceGroupsConfig
description: |
The configuration for the restricted instance groups (RIG) in the SageMaker HyperPod cluster.
value:
SharedEnvironmentConfig:
FSxLustreDeletionPolicy: "{{ FSxLustreDeletionPolicy }}"
FSxLustreConfig:
SizeInGiB: {{ SizeInGiB }}
PerUnitStorageThroughput: {{ PerUnitStorageThroughput }}
- name: VpcConfig
description: |
Specifies an Amazon Virtual Private Cloud (VPC) that your SageMaker jobs, hosted models, and compute resources have access to. You can control access to and from your resources by configuring a VPC. For more information, see Give SageMaker Access to Resources in your Amazon VPC.
value:
SecurityGroupIds:
- "{{ SecurityGroupIds }}"
Subnets:
- "{{ Subnets }}"
- name: Tags
description: |
Custom tags for managing the SageMaker HyperPod cluster as an Amazon Web Services resource. You can add tags to your cluster in the same way you add them in other Amazon Web Services services that support tagging. To learn more about tagging Amazon Web Services resources in general, see Tagging Amazon Web Services Resources User Guide.
value:
- Key: "{{ Key }}"
Value: "{{ Value }}"
- name: Orchestrator
description: |
The type of orchestrator to use for the SageMaker HyperPod cluster. Currently, supported values are "Eks" and "Slurm", which is to use an Amazon Elastic Kubernetes Service or Slurm cluster as the orchestrator. If you specify the Orchestrator field, you must provide exactly one orchestrator configuration: either Eks or Slurm. Specifying both or providing an empty configuration returns a validation error.
value:
Eks:
ClusterArn: "{{ ClusterArn }}"
Slurm:
SlurmConfigStrategy: "{{ SlurmConfigStrategy }}"
- name: NodeRecovery
value: "{{ NodeRecovery }}"
description: |
The node recovery mode for the SageMaker HyperPod cluster. When set to Automatic, SageMaker HyperPod will automatically reboot or replace faulty nodes when issues are detected. When set to None, cluster administrators will need to manually manage any faulty cluster instances.
valid_values: ['Automatic', 'None']
- name: TieredStorageConfig
description: |
The configuration for managed tier checkpointing on the HyperPod cluster. When enabled, this feature uses a multi-tier storage approach for storing model checkpoints, providing faster checkpoint operations and improved fault tolerance across cluster nodes.
value:
Mode: "{{ Mode }}"
InstanceMemoryAllocationPercentage: {{ InstanceMemoryAllocationPercentage }}
- name: NodeProvisioningMode
value: "{{ NodeProvisioningMode }}"
description: |
The mode for provisioning nodes in the cluster. You can specify the following modes: Continuous: Scaling behavior that enables 1) concurrent operation execution within instance groups, 2) continuous retry mechanisms for failed operations, 3) enhanced customer visibility into cluster events through detailed event streams, 4) partial provisioning capabilities. Your clusters and instance groups remain InService while scaling. This mode is only supported for EKS orchestrated clusters.
valid_values: ['Continuous']
- name: ClusterRole
value: "{{ ClusterRole }}"
description: |
The Amazon Resource Name (ARN) of the IAM role that HyperPod assumes to perform cluster autoscaling operations. This role must have permissions for sagemaker:BatchAddClusterNodes and sagemaker:BatchDeleteClusterNodes. This is only required when autoscaling is enabled and when HyperPod is performing autoscaling operations.
- name: AutoScaling
description: |
The autoscaling configuration for the cluster. Enables automatic scaling of cluster nodes based on workload demand using a Karpenter-based system.
value:
Mode: "{{ Mode }}"
AutoScalerType: "{{ AutoScalerType }}"
UPDATE examples
- update_cluster
Updates a SageMaker HyperPod cluster.
UPDATE aws.sagemaker.clusters
SET
ClusterName = '{{ ClusterName }}',
InstanceGroups = '{{ InstanceGroups }}',
RestrictedInstanceGroups = '{{ RestrictedInstanceGroups }}',
RestrictedInstanceGroupsConfig = '{{ RestrictedInstanceGroupsConfig }}',
TieredStorageConfig = '{{ TieredStorageConfig }}',
NodeRecovery = '{{ NodeRecovery }}',
InstanceGroupsToDelete = '{{ InstanceGroupsToDelete }}',
NodeProvisioningMode = '{{ NodeProvisioningMode }}',
ClusterRole = '{{ ClusterRole }}',
AutoScaling = '{{ AutoScaling }}',
Orchestrator = '{{ Orchestrator }}'
WHERE
region = '{{ region }}' --required
AND ClusterName = '{{ ClusterName }}' --required
RETURNING
cluster_arn;
DELETE examples
- delete_cluster
Delete a SageMaker HyperPod cluster.
DELETE FROM aws.sagemaker.clusters
WHERE region = '{{ region }}' --required
;
Lifecycle Methods
- start_cluster_health_check
- update_cluster_software
Start deep health checks for a SageMaker HyperPod cluster. You can use DescribeClusterNode API to track progress of the deep health checks. The unhealthy nodes will be automatically rebooted or replaced. Please see Resilience-related Kubernetes labels by SageMaker HyperPod for details.
EXEC aws.sagemaker.clusters.start_cluster_health_check
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"DeepHealthCheckConfigurations": "{{ DeepHealthCheckConfigurations }}"
}'
;
Updates the platform software of a SageMaker HyperPod cluster for security patching. To learn how to use this API, see Update the SageMaker HyperPod platform software of a cluster. The UpgradeClusterSoftware API call may impact your SageMaker HyperPod cluster uptime and availability. Plan accordingly to mitigate potential disruptions to your workloads.
EXEC aws.sagemaker.clusters.update_cluster_software
@region='{{ region }}' --required
@@json=
'{
"ClusterName": "{{ ClusterName }}",
"InstanceGroups": "{{ InstanceGroups }}",
"DeploymentConfig": "{{ DeploymentConfig }}",
"ImageId": "{{ ImageId }}"
}'
;