View a markdown version of this page

MoveClusterNodes - Amazon SageMaker

MoveClusterNodes

Moves running nodes from one instance group to another instance group. The target instance group can be in the same HyperPod cluster or in a different HyperPod cluster in the same account and Region. The underlying instances aren't terminated.

Each node keeps its instance ID, its NodeLogicalId, its network interfaces and IP addresses, and its capacity. The node then joins the target instance group with the target's configuration and lifecycle scripts.

Important

The move replaces the node's root Amazon Elastic Block Store (Amazon EBS) volume and secondary EBS volume, which deletes any data stored on them. Back up any data that you need before you move the node.

Specify the nodes to move with exactly one of NodeIds, NodeLogicalIds, or InstanceCount. The operation is asynchronous and returns after it accepts the nodes for the move. While a node moves, its status is DetachInProgress and then AttachInProgress. The node appears in the source cluster while it detaches. After HyperPod hands the node off to the target instance group, the node appears in the target cluster. To track the node, call DescribeClusterNode or ListClusterNodes on the source or target cluster.

Note

Both clusters must be InService, use Amazon EKS orchestration, and use Continuous as the NodeProvisioningMode.

The source and target instance groups must also use compatible configurations.

Request Syntax

{ "ClientToken": "string", "InstanceCount": number, "NodeIds": [ "string" ], "NodeLogicalIds": [ "string" ], "SourceClusterArn": "string", "SourceInstanceGroupName": "string", "TargetClusterArn": "string", "TargetInstanceGroupName": "string" }

Request Parameters

For information about the parameters that are common to all actions, see Common Parameters.

The request accepts the following data in JSON format.

ClientToken

A unique, case-sensitive identifier that you provide to ensure that the operation completes no more than one time. If you retry the request with the same client token and the same parameters within 8 hours, the service returns the original response. It doesn't start a new move. If you reuse a client token with different parameters, the request fails.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 64.

Pattern: [\x21-\x7E]+

Required: No

InstanceCount

The number of nodes to move, from 1 to 50. HyperPod selects the nodes from the source instance group. If fewer than this number of nodes are eligible to move, the request fails and no nodes are moved. Specify exactly one of NodeIds, NodeLogicalIds, or InstanceCount.

Type: Integer

Valid Range: Minimum value of 1. Maximum value of 50.

Required: No

NodeIds

A list of instance IDs of the nodes to move. You can specify up to 50 instance IDs. Each node is evaluated separately, so some nodes can be moved while others fail. The request fails if moving the eligible nodes would reduce the source instance group below its minimum instance count. Specify exactly one of NodeIds, NodeLogicalIds, or InstanceCount.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: i-[a-f0-9]{8}(?:[a-f0-9]{9})?

Required: No

NodeLogicalIds

A list of NodeLogicalIds of the nodes to move. You can specify up to 50 NodeLogicalIds. Each node is evaluated separately, so some nodes can be moved while others fail. The request fails if moving the eligible nodes would reduce the source instance group below its minimum instance count. Specify exactly one of NodeIds, NodeLogicalIds, or InstanceCount.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]

Required: No

SourceClusterArn

The Amazon Resource Name (ARN) of the HyperPod cluster that the nodes are moved from.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:cluster/[a-z0-9]{12}

Required: Yes

SourceInstanceGroupName

The name of the instance group in the source cluster that the nodes are moved from.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [a-zA-Z0-9](-*[a-zA-Z0-9])*

Required: Yes

TargetClusterArn

The Amazon Resource Name (ARN) of the HyperPod cluster that the nodes are moved to. The target cluster must be in the same account and Region as the source cluster, and can be the same cluster as the source.

Type: String

Length Constraints: Minimum length of 0. Maximum length of 256.

Pattern: arn:aws[a-z\-]*:sagemaker:[a-z0-9\-]*:[0-9]{12}:cluster/[a-z0-9]{12}

Required: Yes

TargetInstanceGroupName

The name of the instance group in the target cluster that the nodes are moved to. If the target cluster is the same as the source cluster, the target instance group must be different from the source instance group.

Type: String

Length Constraints: Minimum length of 1. Maximum length of 63.

Pattern: [a-zA-Z0-9](-*[a-zA-Z0-9])*

Required: Yes

Response Syntax

{ "Failed": [ { "Code": "string", "Message": "string", "NodeId": "string" } ], "FailedNodeLogicalIds": [ { "Code": "string", "Message": "string", "NodeLogicalId": "string" } ], "Successful": [ "string" ], "SuccessfulNodeLogicalIds": [ "string" ] }

Response Elements

If the action is successful, the service sends back an HTTP 200 response.

The following data is returned in JSON format by the service.

Failed

The instance IDs that could not be moved, each with an error code and message. The response includes this list when you specify NodeIds. If none of the specified nodes can be moved, the request fails and no nodes are moved.

Type: Array of MoveClusterNodesError objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

FailedNodeLogicalIds

The NodeLogicalIds that could not be moved, each with an error code and message. The response includes this list when you specify NodeLogicalIds. If none of the specified nodes can be moved, the request fails and no nodes are moved.

Type: Array of MoveClusterNodeLogicalIdsError objects

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Successful

This list contains the instance IDs of the nodes that were accepted for the move. The response includes this list when you specify NodeIds or InstanceCount.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 256.

Pattern: i-[a-f0-9]{8}(?:[a-f0-9]{9})?

SuccessfulNodeLogicalIds

The NodeLogicalIds of the nodes that were accepted for the move. The response includes this list when you specify NodeLogicalIds.

Type: Array of strings

Array Members: Minimum number of 1 item. Maximum number of 50 items.

Length Constraints: Minimum length of 1. Maximum length of 128.

Pattern: [a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9]

Errors

For information about the errors that are common to all actions, see Common Error Types.

ResourceNotFound

Resource being access is not found.

HTTP Status Code: 400

See Also

For more information about using this API in one of the language-specific AWS SDKs, see the following: